Police constable Andile Kubheka, 24, was accidentally shot and killed by a friend and colleague at Groenvlei police station outside Newcastle, in northern KwaZulu-Natal.
The two men were on night duty on Wednesday and started playing with their service pistols by ejecting the magazines and sliding them back in.
A shot went off, hitting Kubheka in the chest and then injuring his colleague, who cannot be named until he appears in court.
An officer at the station said the other policemen on duty heard the gunshot and rushed to the scene, where they found their colleague.
"We tried to stop the bleeding but we could not save him because he was bleeding profusely," the officer said.
Superintendent Phindile Radebe, provincial police spokesman, said the injured officer was admitted to hospital and he remains under police guard.