Police have struggled to contain mobs who have attacked foreigners from Zimbabwe, Malawi, Mozambique and other African countries in both the economic capital Johannesburg and in the port city of Durban.
The government had vowed to crack down strongly on the unrest, but the decision to put soldiers on the streets came after two nights of relative quiet in both cities.
"We come in as the last resort -- the army will serve as a deterrent," Mapisa-Nqakula told reporters, declining to give details on how many troops would be involved and where.
"Now we deploying because there is an emergency.
Also Read
"We are not here to take over the work of the police. We are simply here to give support to what the police are trying to do in their efforts to prevent a continuation of what we have seen."
The spate of attacks has revived memories of xenophobic bloodshed in 2008, when 62 people were killed in Johannesburg's townships, shaking South Africa's post-apartheid image as a "rainbow nation" of different ethnic groups.
The South African army was deployed to restore order in the 2008 riots, and has also been used against violent strikers in 2012 and 2014.
Graphic photographs of the killing were published in many South African and international newspapers and websites.
"I think it has shaken everybody," Mapisa-Nqakula said referring to the stabbing.
"South Africans now know... Even those who probably did not take it seriously know that... We need to stand up.
"This is not too late, this is just the right time".
Foreigners are often the focus of resentment among poor South Africans who face a chronic jobs shortage, with youth unemployment rate over 50 percent.