The high court decision paves the way for what would become the largest class action in South African history.
The ex-miners say they contracted silicosis, an incurable lung disease, after years of working in the mines.
The court said that a class action was “the only realistic option”.
Judge Phineas Mojapelo’s decision could lead to a court case lasting up to 10 years, the BBC’s Nomsa Maseko reports from Johannesburg.
But the former miners are still hopeful that the case could help improve their lives as well as those of their families, our reporter says.
Among the defendants in the case are Anglo American, AngloGold Ashanti, Gold Fields, Harmony Gold, Sibanye Gold and African Rainbow Minerals, the Reuters news agency reports.
The lawyers representing the miners believe this court ruling marks the first step towards justice.
Most of the miners who allegedly contracted silicosis while working underground have been unable to work for many years, dependent on government grants for a living.
The claims, going back decades, also involve former miners from neighbouring countries such as Lesotho.
One of the companies in this case, Anglo American, reached a $30m (£21m) suit with 400 miners in a separate silicosis case.
It is not clear if this class action will be settled out of court, but for the miners who say they have waited for too long, a speedy resolution would be a form of justice.