The attacks started three weeks ago, with residents saying they are angry that foreigners are taking scarce housing and jobs from poor South Africans.
Violence spread to other urban areas in the country, partly fanned by criminals intent on looting property.
The relocation that began on Sunday is expected to take several weeks.
At least five people were killed in further attacks this week, South Africa's Star newspaper said.
According to the Star, a police report showed that 107 properties had either been looted, attacked or burnt in 86 xenophobic incidents across the country.
More than 1,300 people have been arrested.
A local government spokesman said the new camps would have access to washing facilities, food and basic health care.
He said the ultimate goal of the government was to move the foreigners - many of them Zimbabwean - back
into the communities that had chased them out.
But the opposition Democratic Alliance said the sites were badly chosen.
It said one resettlement centre was in a notoriously violent area and was not safe.
Other sites were in residential areas and risked fanning local resentment, they said.
The UN refugee agency released 2,000 tents to the South African government on Friday to provide shelter to many of the displaced immigrants.
In addition, the agency has provided 7,000 blankets and 2,000 sleeping mats to the victims.
At least 50,000 Mozambicans and Zimbabweans
have left South Africa [EPA]
Ron Redmond, UNHCR's chief spokesman, said it was also making available to the government an expert site planner, who will help the authorities to identify suitable locations for temporary shelter.
"We hope that this initial donation will contribute to alleviating the suffering of people displaced by the xenophobic violence," the spokesman said.
At least 50,000 Mozambicans and Zimbabweans have left South Africa as a result of the unrest.
Harare's ambassador to South Africa, Simon Khaya Moyo, said on Friday his government had sent 10 buses and some trucks to repatriate about 1,000 Zimbabweans caught up in the attacks.
Zimbabweans are the largest immigrant group in South Africa, accounting for an estimated 60 per cent of the five million migrants in the country.
South Africa's population is about 50 million.
Pat Craven, a spokesman for the Congress of South African Trade Unions (Cosatu), told Al Jazeera that poverty, unemployment, a lack of housing and the slow delivery of services were the root cause of the violence.
"We have been warning for years [that it] is a time bomb ticking away.
"It is clearly an indication of utter despair on a very small section of unemployed poverty-stricken South Africans, who have decided to make scapegoats of migrant workers from other countries."