About 1,700 employees participated in the illegal sit-in.
The mineworkers chose not to return to surface at the end of the morning shift on Wednesday afternoon.
Formal demands from the workers were given to the company only late on Thursday, which included the payment of a special bonus, the removal of the general manager and an assurance that disciplinary action against them would not be pursued.
After hours of negotiations on Thursday, 18 employees were evacuated to the surface as a result of ill health.
Some miners were reported to have displayed symptoms of severe fatigue and dehydration, and were treated by Harmony’s medical personnel. Their families were camping outside the mine trying to urge them to end their illegal sit-in.
In a statement, Harmony Gold said all employees returned to surface shortly before midnight on Thursday following all-night discussions between management and union leadership.
The gold miner said a thorough independent investigation into the circumstance surrounding the illegal sit-in would be conducted and that production at the mine would proceed at the weekend
Harmony’s chief executive, Peter Steenkamp said: “We are pleased that a resolution has been reached and that all our employees have returned to surface safely.”
The National Union of Mineworkers, the leading union in the gold sector, had said on Thursday that it was also in the dark about Kusasalethu workers’ demands but was investigating the matter.
Association of Mineworkers and Construction Union (Amcu) said on Friday that it took part in the discussions with mine management. Amcu said it was aware of the bonus demands, which workers had been promised would be paid after the holidays.
The union said the company had commited to paying bonuses before the workers ended their sit-in.