At least two blasts and gunfire were heard at the compound in the Westland district of the city, which houses the Dusit hotel as well as offices.
The Somali-based militant group al-Shabaab claimed the attack but gave no details. Four armed men entered the complex, eyewitnesses say.
Vehicles are on fire in the car park. Police have cordoned off the area and are trying to rescue those inside.
The BBC’s Ferdinand Omondi says the head of Kenya’s Directorate of Criminal Investigations, George Kinoti, is at the scene to lead the police operation.
A woman working in a neighbouring building told Reuters news agency: “I just started hearing gunshots, and then started seeing people running away raising their hands up and some were entering the bank to hide for their lives.”
Security forces have cordoned off the area
Kenya has seen a number of terror attacks in recent years – most notably in areas close to the Somali border and in the country’s capital.
In September 2013, al-Shabaab militants entered the Westgate shopping mall in Nairobi and targeted shoppers using guns.
During an 80-hour siege at the upscale centre, 67 people were killed.
Two years later, the group carried out its deadliest ever assault in Kenya, shooting dead almost 150 people at Garissa University.
Al-Shabaab, a militant Somali Islamist group, opposes the Somali government but has also carried out attacks throughout East Africa.