A 33-year-old female employee "has died from severe head injuries", said Strathmore University's communications director Betty Ngala.
Police said they were merely carrying out a security exercise, but images showed terrified students standing on window ledges at the university, which is close to the centre of the Kenyan capital.
Ngala said "around 15" people needed hospital treatment after the incident, while 22 others were hurt less seriously.
She said most of those injured suffered broken bones after "jumping from high floors".
Also Read
In a statement, the university said the exercise on campus was "aimed at testing the preparedness of the university community and emergency team in the event of an attack".
"Unfortunately some students and staff panicked," it added.
Nairobi police chief Japheth Koome said all the proper procedures were followed for today's drill.
The students' fearful response comes with the country still reeling from a number of high-profile attacks claimed by Somali-led, Al-Qaeda-linked Shebab insurgents.
They include an April massacre at Garissa university in which 148 people were killed, and a 2013 assault on Nairobi's Westgate shopping mall that killed 67.
Another student, Joseph, was quoted as saying by the radio station: "It is very wrong that they didn't tell us. After hearing gunshots I had to run out because there were guys who were dressed like Al-Shebab, like those people we saw in Westgate and we had to run away."
Dr Evans Mwendwa at Nairobi West Hospital told Capital FM radio that at least two people were seriously injured in the panic.