The blaze at Jomo Kenyatta International Airport has caused serious damage, a Nairobi ministry official said.
Images on Kenyan media showed flames rising high into the sky and clouds of black smoke billowing out of the main arrivals and departures terminal.
Firefighters trying to stop the fire spreading have been hampered by shortages of water and the interior ministry appealed for traffic to give way to trucks ferrying water to the airport.
All flights into and out of the airport, except emergency landings, have been cancelled and all roads around the airport have been closed.
The Kenyan Airports Authority has urged people to stay away from the airport as the emergency operation continues.
The fire, which broke out around dawn, is believed to have started in the immigrations area of the arrivals hall.
Passengers and staff were moved to safety and there have been no reports of any injuries.
Arrivals and immigration sections ‘totally damaged’
Kenya National Disaster Operation Centre said while the blaze had been brought under control in the international departures areas, the arrivals terminal was still alight.
Government official Mutea Iringo said: “There is a serious fire at JKIA (airport), but we are doing everything possible to avert a crisis.
“Apart from emergency landings, all flights into and out of JKIA have been cancelled … [the] airport has been shut down.”
Mr Iringo said the fire was “massive” and that the arrivals and immigration sections had been “totally damaged”.
Flights are being diverted to other airports, including the port city of Mombasa.
The airport serves as a regional hub for east Africa, with many long-distance international flights landing there to connect to countries across the region.
Jomo Kenyatta airport is currently undergoing expansion with a new terminal being built to ease congestion.
Senior transport ministry official Michael Kamau described the fire as a “major crisis”.
The blaze comes two days after aircraft were delayed for several hours after the failure of a fuel hydrant needed for refuelling the planes.