The demonstrators in Sheung Shui took aim at so-called "parallel traders" from China who buy vast amounts of duty free goods in Hong Kong and take them back to the mainland to sell at a profit.
Locals say it pushes up prices, overcrowds neighborhoods and adds to growing tensions between Hong Kong residents and mainland Chinese.
"The mainland Chinese come here, block the streets with their bags ... rents have gone up and it has made things more expensive for Hong Kongers," said Jasmin, a 19-year-old student dressed all in black, who only gave her first name.
"I want the government to know that too many of them are coming over here."
The marchers, including families with children, shouted slogans such as "Liberate Hong Kong, Revolution of our times!" and "Patriots use China-made products, don't parallel trade!"
Organizers estimated 10,000 people took part in the march, while police estimated a crowd of 2,500 at its peak.
After the march ended, protesters dressed in black and wearing face masks remained in the area despite calls from organizers to disperse immediately. At one point, riot police stormed through, hitting protesters with batons and using pepper spray. It was unclear what triggered their intervention.
A few dozen people were arrested. They were seen sitting on the ground and leaning against a wall while police took down their details and were later escorted into two white buses.
Many shops in the area were closed.
Earlier in the day, in a separated incident, police fired tear gas to disperse a group of protesters hurling petrol bombs over the fence of the Sheung Shui police station before the march, damaging one police vehicle.
Sunday's protests follow a march in central Hong Kong of at least tens of thousands on New Year's Day and an escalation in clashes with the police over the festive period.
Anti-government protests in Chinese-ruled Hong Kong escalated in June over a now-withdrawn extradition bill, but have since developed into a broader movement, with demands including universal suffrage and an independent inquiry against alleged police brutality.
The police maintain they have acted with restraint.
Many people in Hong Kong are angered by Beijing's tight grip on the city which was promised a high degree of autonomy under this framework when the former British colony returned to Chinese rule in 1997.
Beijing denies interference and blames the West for fomenting the unrest.
The protest movement is supported by 59% of the city's residents polled in a survey conducted for Reuters by the Hong Kong Public Opinion Research Institute.
In a Saturday statement, China's ministry of human resources and social security said the head of its Hong Kong Liaison Office, the most senior mainland political official based in the Chinese-controlled territory, had been replaced.
Wang Zhimin, who had held the post since 2017, had been replaced by Luo Huining, who until November was the top communist party official in the northern province of Shanxi.Reuters reported exclusively in November that Beijing was considering potential replacements for Wang, in a sign of dissatisfaction with the Liaison Office's handling of the crisis.