Afghan security forces killed four attackers during the night-time siege, interior ministry spokesman Najib Danish told Tolo News, during which people trapped inside the landmark hotel were seen climbing over balconies to escape.
"The attack is over," he said.
"Five Afghans and one foreigner have been killed," interior ministry deputy spokesman Nasrat Rahimi told AFP, adding around 150 people were rescued, including more than 40 foreigners.
"The body of the foreigner, a woman, was recovered from the sixth floor as the last attacker was being killed," he added.
But an official with Afghanistan's spy agency told AFP the attack was "not over yet" with attackers "still shooting on security forces".
Dramatic images broadcast on Afghanistan's Tolo News showed thick black smoke and flames billowing from the top of the six-floor hilltop Intercontinental hotel -- which is not part of the global InterContinental chain.
Several people could be seen climbing over a top-floor balcony using bedsheets to escape, with one losing his grip and plunging to the ground.
Officials said four gunmen burst into the hotel on Saturday night, opening fire on guests and staff and taking dozens of people hostage.
There was no immediate claim of responsibility for the latest assault in the war-torn Afghan capital, which followed a series of security warnings in recent days to avoid hotels and other locations frequented by foreigners.
It was not clear how many people had been inside the hotel, which was attacked by Taliban militants in 2011.
A guest hiding in a room said he could hear gunfire inside the 1960s hotel where dozens of people attending an information technology conference on Sunday were staying.
"I don't know if the attackers are inside the hotel but I can hear gunfire from somewhere near the first floor," the man, who did not want to be named, tolf AFP by telephone.
"We are hiding in our rooms. I beg the security forces to rescue us as soon as possible before they reach and kill us."
His phone was switched off when AFP tried to contact him again.
Afghan Telecom regional director Aziz Tayeb, who was attending the IT conference, said he saw the attackers enter the hotel as he was walking towards the exit.
"Everything became chaotic in a moment. I hid behind a pillar and I saw people who were enjoying themselves a second ago screaming and fleeing like crazy, and some of them falling down, hit by bullets," Tayeb told AFP.
Local resident Abdul Sattar said he had spoken by phone to some of his friends who are chefs and waiters at the hotel and had been trapped inside.
"Suddenly they attacked the dinner gathering... (then) they broke into the rooms, took some people hostage and they opened fire on some of them," he told AFP.
Rahimi said the attackers were armed with small weapons and rocket-propelled grenades when they stormed the hotel, which is a popular venue for weddings, conferences and political gatherings.
The last major attack on a high-end hotel in Kabul was in March 2014 when four teenage gunmen raided the Serena, killing nine people including AFP journalist Sardar Ahmad.
The Intercontinental was previously targeted in June 2011 when a suicide attack claimed by the Taliban killed 21 people, including 10 civilians.
Security at the Intercontinental is relatively lax compared with other luxury hotels in Kabul.
Even before the attack was over, authorities were questioning how the assailants got past the hotel's security, which was taken over by a private company three weeks ago, Danish said.
"We will investigate it," he said.
A hotel employee told AFP that as he fled the staff living quarters located in a building next to the hotel he saw the new security guards running for their lives.
"They didn't do anything, they didn't attack. They had no experience," the man said on the condition of anonymity.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)