At least 600 foreign nationals were arrested by police on Wednesday, South African media reports.
In the targeted search operation carried out in the main city, Johannesburg, police also confiscated firearms and a "large consignment" of counterfeit goods in various buildings.
David Makhura, premier of the Gauteng province which surrounds Johannesburg, tweeted that the crackdown is a part of a clean-up operation.
He said authorities were happy with the number of suspects arrested, according to South African newspaper the Citizen.
“The main issue have [sic] been with people who are driving taxis without licences and these taxis are not supposed to be on our roads," the paper quotes the premier as saying.
The operation, known as O Kae Molao, is trending on social media, where some people raised concerns that it might encourage xenophobia.