The Ministry of Foreign Affairs has urged Nigerians to avoid travelling to high risk and volatile areas in South Africa until the situation is brought under control.
The government's travel advisory followed the wave of renewed xenophobic attacks in the Rainbow nation, where businesses belonging to foreigners were looted and burnt.
South African police arrested more than 80 people and confirmed five deaths as riots in Johannesburg and Pretoria intensified on Tuesday.
President Muhammadu Buhari dispatched a special envoy to meet with President Cyril Ramaphosa to secure the "safety of Nigerian citizens' lives and property".
A statement by the ministry's spokesperson, Ferdinand Nwonye, said the federal government commended the arrest of some perpetrators of the dastardly act and called for timely prosecution to serve as deterrent to others.
The statement read: "The Federal Government of Nigeria totally condemns the renewed attacks on foreign nationals and their businesses in South Africa which has led to the loss of lives and property worth millions of Naira.
"The Government of Nigeria is engaging the relevant South African authorities via the Nigerian High Commission in Pretoria, Consulate General in Johannesburg and Ministry of Foreign Affairs in Abuja to ensure that definite measures are put in place to curtail the unfortunate attacks.
"The Federal Government commends the arrest of some perpetrators of the dastardly act by the South African Police and calls for timely prosecution to serve as deterrent to others.
"However, due to the tension created by the attacks, the Government of Nigeria wishes to advice Nigerians to avoid travelling to high risk and volatile areas until the situation is brought under control.
"The Ministry of Foreign Affairs wishes to assure the general public that Government is committed to the protection of lives and property of Nigerians in South Africa."