Vuyani Zondani, 28, shot at the officers in Zwide township, Port Elizabeth in April 2012, Warrant Officer Thembi Gwe said.
Constable Mongezi Mqina and Constable Thandi Bambiso were on patrol when they saw people drinking in public.
The officers approached them and Zondani shot at them while they were still in the police vehicle. He killed Bambiso and wounded Mqina.
"Although seriously injured, Constable Mqina retaliated. He managed to get control of the vehicle and drove back to Zwide satellite station for backup. He was later taken to hospital."
Zondani was arrested a few days later.
He was sentenced to life in prison for the murder, 10 years for attempted murder, 15 years for possession of an illegal firearm and five years for illegal possession of ammunition.
The sentences would run concurrently, Gwe said.