Police have now apprehended the individual who shot Craig Greenberg, running to be Louisville’s next Democratic mayor, around 1000 local time (1500 GMT).
Mr Greenberg later tweeted his team was safe and he would provide an update in due course.
No motive has yet been identified by Louisville police.
According to police, the shots hit Mr Greenberg’s clothing but nobody was injured by the lone shooter.
Several people, including Mr Greenberg, were seen being escorted unharmed out of the building by police.
“We consider ourselves very fortunate today,” said Louisville police chief Erika Shields at a Monday afternoon news conference.
Neither the police nor the candidate’s office have responded to requests for comment.
David James, president of the local metro council, told local media the shooting was an attempt on Mr Greenberg’s life.
Mr James did not witness the incident himself but said he had spoken to staff in Mr Greenberg’s office shortly afterward.
An attorney and entrepreneur by trade, Mr Greenberg entered the race to succeed outgoing Louisville Mayor Greg Fischer last year.
His focus on public safety has drawn strong fundraising numbers and a handful of endorsements from local politicians including Mr James.
Last month, Mr Greenberg released a plan to address policing, crime and quality of life for area residents.
Homicide totals in the city have broken records over the past two years.