The 36-year-old man had an appointment to meet his eight-year-old daughter at a social worker’s office, Captain Pelonomi Makau said.
When the ex-wife, her husband and the daughter arrived around 8am, the man pulled out a gun and instructed his daughter to run inside.
“A female friend of the social worker was in the house when she heard gunshots fired,” Makau said.
The friend ran out of the house and saw the man and the social worker lying dead next to the road.
The man left a suicide note which stated that the ex-wife had denied him access to his daughter.
Both the ex-wife and her husband had head injuries.
Makau said the woman was in a critical condition. Her husband died in hospital.
The Suid-Afrikaanse Vroue Federasie (Savf) said it was mourning the death of their “valued” social worker.
“Our prayers and deepest condolences are with his family, colleagues, friends and everybody who loved him,” it said in a statement.
“Fortunately, the children were not harmed in the incident.”