The attack happened at the Richmond Road Baptist Church in the city of Lexington, authorities said.
The suspect had earlier shot and wounded a state trooper and has since been killed by police.
Police chief Lawrence Weathers told a news conference the trooper had pulled over a vehicle near Blue Grass Airport in Lexington.
After shooting the trooper, the suspect carjacked a vehicle and fled to the church and began shooting at people there, according to authorities.
Read more US news:
Trump threatens to revoke comedian’s citizenship
Farmer becomes first person to die during ICE raids
“Preliminary information indicates that the suspect may have had a connection to the individuals at the church,” Mr Weathers said.
No further details of the suspect have been released as yet.
Mr Beshear said: “Please pray for everyone affected by these senseless acts of violence, and let’s give thanks for the swift response by the Lexington Police Department and Kentucky State Police.”