Chinese traders in Tanzania's main city of Dar es Salaam have been give 30 days to stop trading in a busy market.
The deputy industry minister said Chinese businessmen were allowed into the country as investors, but not as "vendors or shoe-shiners".
Lazaro Nyalandu said these jobs could "be carried out by locals", Tanzania's Citizen paper quotes him as saying.
A BBC reporter says there are many foreigners trading illegally in Tanzania, especially from China.
They have opened up many small retail and wholesale shops, the BBC's Hassan Mhelela in Dar es Salaam says.
But the Chinese traders are sometimes resented for their business acumen, he says.
Mr Nyalandu made the comments at Kariakoo market, which the government wants to become an export centre for the East African nation.
He also said that Tanzania was about to do a deal with the Chinese government to ensure that goods imported from China meet international standards, Tanzania's Guardian newspaper reports.