Hundreds of passengers have been left stranded outside Jomo Kenyatta International Airport (JKIA).
It has reopened for cargo and domestic services, though many flights have been diverted to other regional airports.
The Kenyan authorities say no casualties have been reported and that the blaze has been contained.
The cause of the fire is not yet known. Security officials say they are waiting to inspect the damage before drawing any conclusions.
However, correspondents say the airport is old and overcrowded.
Kenya’s anti-terrorism chief, Boniface Mwaniki, said he did not believe the fire – which happened on the 15th anniversary of the bombings by al-Qaeda of the US embassies in Nairobi and Dar es Salaam, Tanzania – was connected to terrorism.
“We don’t want to speculate, but at this stage we do not think there is any such link,” he told the Reuters news agency.
The fire started in the airport’s international arrivals and immigration area at around 05:00 (02:00 GMT) and spread quickly. Dark smoke was seen billowing into the sky above Nairobi as the blaze took hold.
Passengers arriving on international flights – some still in their seats – reported hearing explosions from the terminal building.
“When I arrived there were one or two fire engines parked outside the international arrivals. It spread very fast,” British passenger, Martyn Collbeck, told the Associated Press. “I would have expected more fire engines to respond faster.”
Fire engines battled through Nairobi’s infamous traffic jams to reach the airport. Witnesses said some did not arrive until one or two hours after the fire began. Many fire engines also quickly ran out of water.
It took about four hours to bring the fire under control, by which time the arrivals hall had been gutted. There were no immediate reports of any deaths of serious injuries, although two people were treated for smoke inhalation.
International flights carrying business travelers and tourists were initially diverted to the southern coastal city of Mombasa.
Later, flights were also diverted to Eldoret in the north-west and Kisumu in the west, as well as Dar es Salaam, and Entebbe in Uganda. Passengers faced bus journeys of hundreds of miles to reach Nairobi.
Passengers outside the airport said they had been stranded with no information, reports the BBC’s Emmanuel Igunza at the airport.
“This is too much. It was very nice here but this is just a mess,” said Medr Gudru, a German tourist who had hoped to fly home on Wednesday.
“The airlines are working to assist stranded passengers and advise them on the measures being put in place to resume services at JKIA,” said Stephen Gichuki, director of the Kenyan Airports Authority (KAA).
On Wednesday afternoon, almost 12 hours after the fire began, government officials said the airport had reopened for domestic and cargo flights.
Kenya Airways said a flight to Mombasa was expected to depart at 19:00, the Daily Nation newspaper reported.
Cabinet Secretary for Transport Michael Kamau told reporters that the authorities would begin preparing the small domestic terminal for handling international departures and arrivals.
“We started pitching tents on the airside for handling departing passengers,” he added.
President Uhuru Kenyatta – whose father the airport is named after – has toured the remains of the international arrivals hall to see the damage. The building was gutted by the fire and the roof has partially collapsed. The floor is covered in debris and water.
The airport is a regional hub and a vital part of Kenya’s tourism industry, reports BBC Africa correspondent Andrew Harding in Johannesburg.
“President Kenyatta wishes to reassure the entire aviation industry, investors, local and international travelers that everything is being done to resume normal operations,” presidential spokesman Manoah Esipisu said.
A third of Europe’s flower imports, and many fresh vegetables, also come from Kenya.
“This is disastrous,” Jane Ngige, chief executive officer of the exporters association, Kenya Flower Council, told Reuters.
Shares in Kenya Airways, which uses the airport as its main hub, fell 2% after the fire.
Foreign airlines which use the terminal include British Airways, Emirates, Qatar Airways, KLM, Turkish Airways, South African Airways and Ethiopian Airways. Several cancelled flights to Nairobi on Wednesday.
Kenya Airways said flights from London and Bangkok would land as scheduled in Nairobi on Thursday morning, according to Reuters.
British Airways said it was in contact with the authorities to provide customers due to travel with as much information and notice as possible.