The Pretoria High Court ruled that Robin Stransham-Ford, 65, who was diagnosed with terminal prostate cancer in 2013, could allow a doctor to help him end his life.
Judge Hans Fabricius said that the doctor treating him could not now be prosecuted or face disciplinary action.
Campaign group Dignity SA says Mr Stransham-Ford later died.
He "died peacefully of natural causes", said Dignity SA, which helped Mr Stransham-Ford bring his case.
Before they learnt of his death, state prosecutors had said they would appeal against the ruling.
National Prosecuting Authority (NPA) spokesman Mthunzi Mhaga said the ruling was "precedent-setting" and had "far-reaching implications" from a health and constitutional point of view.
Judge Fabricius, quoted in local media, said the ruling applied only to Mr Stransham-Ford and that future cases would be debated on their merits.
"It is not correct to say from now on it will be a free-for-all," he is quoted as saying.
The justice and health ministers, as well as the Health Professions Council of South Africa, have opposed the legal case.
Dignity SA said it would welcome an appeal as a chance to test the right to die against the constitution, the Associated Press news agency reports.
Mr Stransham-Ford, a lawyer in Cape Town, had requested that the doctor who cares for him be protected from prosecution, losing his doctor's licence or being sued.
A South African court has granted a terminally ill man the right to die, in a landmark ruling for assisted suicide.