The dead after an 11-hour standoff included 15 civilians, three security guards, a police officer and seven Taliban attackers, Kabul police chief Ayoub Salangi said.
Fifty people who had been held hostage at the hotel were rescued, Salangi said.
CNN said the hostages had been held at the Spozhmai hotel where attackers took explosives shortly before midnight Thursday.
NATO and Afghan troops engaged in a gunbattle with the attackers, some dressed as women wearing burqas.
Panicked guests fled, some jumping into the lake.
On their Web site, the Taliban called the Spozhmai and other hotels at the resort "prime places in Kabul for prostitution and parties," The New York Times said.
The hotels are "usually used for immoral and unethical purposes both for the foreigners and their puppet colleagues," the Taliban said.
Afghan National Army soldiers arrived at the hotel not long after midnight and began the effort to retake it with support from NATO forces.
Kate Middleton recycles dress at movie premiere
Beyonce flaunts bikini body, Blue Ivy in vacation pics