It alleges that Nigerian-owned businesses have been targeted in the South African city, saying, in a tweet, that “enough is enough”.
Other African governments have issued warnings to their citizens over the violence.
South African officials have blamed criminality rather than xenophobia for the current problems.
On Monday, dozens of people were arrested in Johannesburg after rioters looted shops and torched buildings and vehicles.
Police fired tear gas, rubber bullets and stun grenades in an attempt to quell the unrest.
In a statement, Nigeria’s high commission in South Africa described the situation as “anarchy”, and has called on Nigerians to come forward to report what has happened to them.
‘Don’t wear expensive jewellery’
Ethiopia’s embassy in South Africa has advised its citizens to close their businesses during the on-going tension, according to Ethiopia’s state-linked Fana Broadcasting Corporate (FBC).
It also says that Ethiopians are advised to “distance themselves from any confrontation and conflict” and not go out wearing expensive jewellery.
Meanwhile, Zambia’s transport ministry has said that lorry drivers should “avoid travelling to South Africa until the security situation improves”.
The statement refers to reported attacks on foreign lorry drivers. The South African IOL news site says that there have been “numerous incidents” of vehicles being looted.
But South Africa’s police minister, Bheki Cele, said on Monday that “criminality rather than xenophobia” was to blame for the “senseless violence”.
“[Xenophobia] is used as an excuse,” he told reporters after visiting Johannesburg’s Central Business District, where much of the unrest has been taking place. “Nothing… has sparked any form of conflict between the South Africans and foreign nationals.”