The man, who was hospitalized with deep lacerations and bruises, had joined hundreds of bystanders surrounding the animal.
The death of Mohawk, a majestic 13-year-old big cat so named because of the shape of his black mane, sparked an outcry among Kenyans. Citizens used hashtag #JusticeforMohawk to ask why rangers did not tranquilize him instead.
Kenya Wildlife Service spokesman Paul Udoto said the lion escaped from the Nairobi National Park on Wednesday and ended up in Isinya town, 12 miles away.
Veterinary teams headed to Isinya after they got word on Mohawk's whereabouts.
But noise and commotion from bystanders agitated the animal, prompting it to attack the man. In order to save lives, rangers shot it to death before veterinarians arrived with tranquilizers, Udoto said.
"This action was taken as a last resort after an escalation of the situation and a concern for public safety," the Kenya Wildlife Service said.
The Nairobi National Park has had several lion escapes in recent weeks
. All but Mohawk have been recaptured alive.
In a separate incident this month, a lion escaped from the park and mauled a man on a busy street in the capital.
Last month, a pride of lions
made its way into residential areas in Nairobi in the dead of the night, leaving officials scrambling to find them. Some animals eventually returned to the park.
Residents have complicated efforts to recapture the animals by trying to take selfies with them, Udoto has said in the past.
"Are you out of your senses?" he asked.
Nairobi National Park is home to leopards, buffaloes, giraffes and other animals grazing in sprawling grasslands -- the city's skyscrapers in the background. It is largely bounded by an electric fence to keep animals inside.
But its south side -- away from the city -- is bordered by a river. It's unclear whether that's the path the lions use to sneak out.
Why are lions escaping?
The Kenya Wildlife Service said it is unsure why there is a surge in escapes, but conservationists cite habitat loss as the central reason.
As one of the fastest growing African cities, property values are increasing in Nairobi, and the park is getting encroached on by lucrative development projects.
The government also started building a highway through a section of the park, agitating the animals with constant noise.
South African lion sneaks out
In a separate incident on the other side of the continent, Sylvester the lion broke out of a national park
in South Africa, officials said.
South African officials vowed to put him down once they capture him, prompting a Twitter hashtag #SaveSylvester
and an online petition
to rescue the big cat.
This is not the first time Sylvester has strayed away from the park.
Conservationists have a reason to try and save the king of the jungle.
The African lion population has gone down by half since the 1950s, according to conservation group Defenders of Wildlife