The former police captain ran a covert counter-insurgency unit that detained and killed anti-apartheid activists.
It operated in secrecy from Vlakplaas, a farm near Pretoria, recruiting black liberation movement members whom it turned into killers.
He revealed the existence of Vlakplaas in 1989 when he was smuggled out of South Africa to write his story.
Coetzee claimed responsibility for the killings of several African National Congress (ANC) members.
He took refuge in London after exposing the group in an interview with a liberal Afrikaans newspaper.
Once he was in exile, he joined the ANC, where he was known as Comrade Dirk with allegiance to Nelson Mandela, and himself became an assassination target for the white-minority government.
He later returned to South Africa and joined the post-apartheid spy service after Mr Mandela became president in 1994.
He was later convicted of murder, but granted amnesty by the Truth and Reconciliation Commission in 1997 when he publicly confessed to murdering a Durban human rights lawyer, Griffiths Mxenge.
However, Coetzee failed to reveal the place where another activist, Sizwe Kondile, had been buried after being killed and burnt.
Coetzee was central to many secrets of the apartheid era, but in giving him amnesty for his crimes, the Truth Commission found that he had simply been following orders from higher-ranking security police commanders.
He died at Life Wilgers Hospital in Pretoria from kidney failure, a hospital spokeswoman said on Thursday.