The miners will be charged with illegal mining, South African police said on Monday.
Ten of the men emerged blinking in the sunlight and covered in yellow-brown dust on Monday in a field in Benoni, a town east of Johannesburg, adding to a dozen who came up the previous day after a crane removed a concrete slab blocking their exit.
They were given a cold drink and medical check before being taken away to the nearby police station.
Reporters were not allowed to speak to them, and police and private mine security guards stood guard at the entrance to the ventilation shaft in case an unknown number of other miners who refused to come up changed their minds.
Illegal mining of abandoned shafts is common in the gold mines around Johannesburg, with informal miners living underground in dangerous, cramped conditions for weeks on end as they dig out small parcels of gold-bearing ore.
Many are illegal migrants from Zimbabwe, Mozambique and Lesotho. Fatal accidents are common, and underground battles between rival groups have also been reported.
Bullion producer Gold One, which owns the mine, had blocked the shaft with a large slab to prevent access but the illegal miners burrowed around it. The slab then shifted, blocking their exit until it was removed by rescue workers.