The suspects fled, but when the officers pursued them they opened fire in Grindel Crescent, wounding the sergeant at the wheel of a police vehicle.
He was taken to hospital, where he died.
Police spokesperson Lt-Col Andrè Traut said the sergeant's partner, a constable, escaped unharmed.
“The Western Cape police management wishes to express their sincere condolences to the family and colleagues of the member who died while protecting the community, and assure them that every endeavour will be made to apprehend the suspects so that they can be prosecuted with the full might of the law,” said Traut.
Police sources said the mood among officers in the area was sombre on Tuesday morning after news broke that the sergeant had died.