China's parliament has made disrespecting the national anthem a criminal offence punishable by up to three years in jail.
Members of China's Communist Party-controlled legislature, the National People's Congress, approved the amendment on Saturday that could see offenders face imprisonment of up to three years.
Hong Kong's government, which is dominated by Beijing loyalists, has begun including the national-anthem law in local legislation.
Pro-democracy activists fear the law could be used to further undermine freedom of speech in Hong Kong and Macau.
The move comes as the anthem, March of the Volunteers, has in recent months become a political flashpoint in Hong Kong, where tensions are rising over Beijing's efforts to assert its authority over the territory.
Last month, the anthem was booed by some Hong Kong football fans during a qualifier against Malaysia, while others chose to turn their backs as it was being played.
Ip Kwok-him, a Hong Kong deputy to the national body and an executive councillor, was quoted by the South China Morning Post as saying: "When the law takes effect, [people] have to stand up and show respect."
"Someone asked whether people who are walking have to stop. Yes, just stop."
The amended law follows Xi Jinping's appointment to a second five-year term as party leader, for which he has touted a vision of achieving a "Chinese Dream" of a powerful, prosperous nation.
Hong Kong, a former British colony, returned to Chinese rule in 1997 with the promise that Beijing would grant the city a high degree of autonomy and an independent judiciary under a "one country, two systems" arrangement.
But over two decades of Chinese rule, differences have deepened between leaders in Beijing and a younger generation of democracy advocates, some of whom are now calling for the financial hub to eventually split from China.
Source: Al Jazeera News