Protesters clashed with crowds of residents opposed to the event, who taunted them along the route.
Officers drew batons and used pepper spray on the crowds after the demonstration on Sunday turned ugly. Ten officers were injured.
Those arrested included a 13-year-old boy.
Hundreds had turned out for the third major protest in the past month to target the mainland shoppers, who have been blamed for voracious buying habits that distort the local economy.
The protesters marched in the suburban district of Yuen Long, near the border with China. The route went through a neighbourhood with dozens of pharmacies selling imported baby formula to cater to mainland shoppers. Chinese shun domestic brands after repeated food safety scares, including a 2008 melamine-tainted-milk scandal that killed at least six babies.
Baby formula is such a hot commodity for mainland visitors that Hong Kong, which has a reputation for authentic and high-quality goods, restricts the amount people can take out of the city.
Smartphones, cosmetics, medicine and luxury goods are also popular purchases in Hong Kong, where the lack of sales tax makes them cheaper.
Mainland visitors are estimated to be responsible for a third of retail sales in Hong Kong.
The incoming shoppers, usually seen in big groups with wheeled suitcases, often work for networks that organise the resale of the goods across the border for a profit, in what’s known as parallel trading.
“There is a lot of anger from other people on Chinese smugglers because we just don’t like how they drive up all the prices, drive up everything, create a lot of chaos, and we aren’t benefiting from it,” protester Kelvin Lee said.
The Hong Kong government says it’s trying to clamp down on parallel trading. More than 1,900 mainlanders have been arrested in the past two years on suspicion of being involved, while 25,000 others have been banned from entering the city for the same reason.
The Yuen Long demonstration follows two other rowdy protests at shopping malls in other parts of Hong Kong’s northern suburbs last month.
Mr Lee said residents of the suburban towns were fed up with the traffic jams and piles of garbage created by mainland Chinese shoppers, who also have a reputation for bad manners and loutish behaviour.
“A lot of Chinese coming to shop block the roads with their luggage,” he said. “They leave a lot of rubbish.”
Such resentment helped fuel the massive pro-democracy protests that rocked Hong Kong for 11 weeks last year. The student-led “Umbrella Movement” occupied streets to demand Hong Kong abandon Beijing’s plan to restrict inaugural 2017 elections for the city’s top leader. After police cleared demonstrators off the streets of the Mong Kok neighbourhood in early December, some frustrated protesters started holding late-night, flash-mob-style occupations at stores in the area frequented by mainland shoppers.
They were inspired by a call from Hong Kong’s unpopular, Beijing-backed leader, chief executive Leung Chun-ying, for people to go shopping after the police clearance.