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.
But an official with Afghanistan's spy agency told AFP the attack was "not over yet" with attackers "still shooting on security forces".
More From This Section
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.
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.
During the night special forces were lowered by helicopters onto the roof of the landmark building, Rahimi told AFP.
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.
"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.
"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.
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.