An woman walks with her child through a street near Xiaobei Rd, where many of Guangzhou's African migrants live. Photograph: Tania Branigan for the Guardian

The red vinyl banner hanging from the front of Canaan market, a multi-storey wholesale emporium of cheap jeans and hair extensions, begins promisingly "Welcome to Guangzhou" and concludes, less warmly, "Please have your passport ready for checks by police".

This southern city in China's Guangdong province has drawn hundreds of thousands of immigrants from across Africa in the last decade: from Burkina Faso and Somalia, Ivory Coast and Ghana, Tanzania and Angola. The banner and the dwindling numbers of traders here attest to an immigration crackdown that has alienated many and left young men injured and languishing in detention, community leaders say.

"You go home: the police are knocking on your door. You are on the street: police will hold you. You are on the bus, inside a restaurant – it's everywhere," says Ojukwu Emma, president of the Association of the Nigerian Community, whose compatriots account for almost half the migrants.

It has not always been this way. Between 30,000 and 100,000 Africans, mainly young men, are living here. Most are traders lured by the cheapness and variety of goods made in the surrounding Pearl River Delta. In complexes such as Canaan, they purchase nappies, tractor parts, luxuriantly floral shirts, stock cubes, mobile phones, air conditioners, and pirate DVDs. In the Chinese-run cafes around the buildings they eat plantains and fufu as well as rice.

Some buyers stay for a few weeks. Others, such as Eric Rufito, make it their home. The 55-year-old businessman arrived 10 years ago from Bukavu in the Democratic Republic of the Congo on, he says, the instructions of the Holy Spirit, with one suitcase and his Bible. He had never met a Chinese person. "I knew about Mao only," he says. "I didn't know they were like they are now. I was surprised when I found it was so capitalist."

His family embraced the new China; his 12-year-old daughter speaks Chinese and English but not his mother tongue, French. Beneath a list of machinery, "mineral processing – forestry – livestock", his green and yellow business card promises: "We help you to produce, to turn the Democratic Republic of Congo into Africa's China." Rufito remains positive about his adopted homeland. "China is moving. Europe is not," he says. "European people should also learn from China – to co-operate and be friendly, not be a big fish eating a small fish."

But for Nkiruka Obi – not his real name – it is a different story. The Nigerian would have come to Europe, but knew visas were hard to get. So he came here to buy clothes and computer parts with money saved from jobs in Gabon, South Africa and Libya. "My friend told me there was hustling here, but you know? He deceived me." The man took him "home" to a flat to recover from his flight. When Obi emerged from the shower, his friend had vanished; so had his money. Now he is stuck. It is easy to get here, hard to stay and often hard to leave.

China tightened immigration controls ahead of the Olympics, ending the routine renewal of short-term visas. Recently, with the approach of November's Asian Games in Guangzhou, restrictions have tightened again.

Africans here say students and those with established businesses are usually fine, but others struggle to get renewals either on the mainland or in Hong Kong or Macau. Some fly home to reapply. But Obi, whose visa expired two weeks ago, cannot afford a ticket or the 5,000 yuan fine for overstaying.

It is common for China to restrict visas in the run-up to big events. But Africans allege they are bearing the brunt. They believe it is harder to gain renewal and complain they are targeted in random raids, with police demanding passports from any black faces present.

"There are many Chinese people in my country – working there, selling there. Nobody is pursuing them," said Obi. He is restless; reluctant to loiter in a restaurant, on the street or even at a friend's home, lest the police come. "If I see them, I run," he says. "That's how I live."

Those seized are detained for 21 days if they cannot pay the fine; longer if they cannot afford a plane fare. Sometimes officers will let overstayers slip away for a bribe of 2,000-10,000 yuan (£188-£940), they say. Many risk their lives to escape, leaping from buildings to escape raids and paying with broken limbs.

Emma, the community leader, had just returned from telling a Nigerian family their son had died. He jumped from the sixth floor as he fled police and the hospital had concluded there was no point keeping him on life support. "He was 30. If not for the police he might be alive today," she says.

Guangzhou public security bureau did not respond to queries. But Emma argued the raids merely pushed people underground and into crime, when the city should be benefiting from them.

Business has fallen by a third to a half, say Chinese vendors who depend on African clients. Migrants are already leaving Guangzhou for cities with more sympathetic officials.

Mary Ngum – not her real name – is here legitimately but says she would rather return to west Africa than endure police raids and wider discrimination.

Elegant and well-spoken, she sighs over the headmaster who refused to hire her to teach "because you are black"; the strangers who hold their noses when she sits beside them on the bus; the derogatory remarks she overhears. Many blame ignorance, not malice, but she thinks Guangzhou worse than other cities she has lived in: "They are always talking about colour," she says.

Some fear popular prejudice is growing, and fuelling the crackdown.

"African people should obey the Chinese government's laws, because some are doing drugs and are criminals," says Ah Ling, who runs a T-shirt stall in Canaan market. But she is careful to add that others are law-abiding.

When Professor Barry Sautman of the Hong Kong University of Science and Technology surveyed residents recently, about half had a neutral impression of the African community, he says, and far more had a good or excellent impression than a negative one. Traders often rely on Chinese staff. Friendships have developed. About 500 Nigerians are in mixed marriages and many more couples cohabit, say residents.

"It's easier than with Europeans," adds Rufito. "In China we live like in Africa. You have your bottle – you share it with others. In Europe? They do not share the bottle."

Africa's links to China

Sino-African links developed during the Cold War and trade was one beneficiary, rising from $177m in 1970 to $765m in 1978. China's spectacular development saw that figure soar to $6.48bn in 1999. It is now the continent's second largest partner, with trade worth $91.7bn last year.

According to state news agency Xinhua, there are around 1m Chinese people in Africa, of whom the largest number (around 300,000) are in South Africa. Others put the overall figure at perhaps double that.

The Guangzhou Academy of Social Sciences has estimated that there are around 30,000 legal migrants from Africa in the city. Its senior researcher Dr Peng Peng said the number of Africans arriving grew by around 30% to 40% annually between 2003 and 2008, but now appeared to have peaked. Local media have suggested there could be 100,000 African residents in total.

Research by Lin Yi

• This article was amended on 7 October 2010. Due to an editing error the original referred to Guangzhou as a southern city in China's Guangzhou province. This has been corrected.

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.