As officers approached the man, Deontea Mackey, 17, to interview him about a weapon purchase, he ran, Greenville Police Chief Ken Miller said.
Miller initially said officers were serving a warrant but he later corrected himself.
Mackey led officers on a brief chase and took cover behind a home, where he opened fire, Miller said.
Officer Allen Jacobs, 28, was struck multiple times.
Police at the scene "performed CPR on our officer, the CPR was unsuccessful and he was declared deceased at the hospital," Miller said.
Jacobs' gun remained in his holster, still snapped in place, the chief said.
Mackey fled again and after a brief phone call to his mother telling her what he was about to do, he fatally shot himself, according to Miller.
Officers are receiving peer support for their fallen comrade, Miller said.
Jacobs was a husband, father of two, and expecting a third child, Miller said. He served with the Army in Iraq and was on Greenville's police force for four and a half years.
"He was as dedicated as anyone can be dedicated. We lose, we hurt, we ache, we feel this, but our community will too," Miller said.
After the shooting, the department changed the profile picture on its Facebook page to show a Greenville police badge covered by a black banner.