The stern message came after young pro-democracy activists won seats on Hong Kong’s Legislative Council (LegCo).
The Chinese government underlined its “resolute opposition” to any independence activities on the council or outside it.
Many in Hong Kong are increasingly concerned about Beijing’s interventions in its politics.
Thirty pro-democracy candidates were elected to the 70-seat LegCo on Sunday, up from 27 previously, meaning they retain the ability to veto major constitutional changes.
At least six young candidates who support self-determination for Hong Kong won seats.
They include Nathan Law, a 23-year-old who played a prominent role in 2014’s “Umbrella Protests” and co-founded the Demosisto Party with well-known activist Joshua Wong.
Several candidates were banned from running in the elections for failing to prove they no longer backed Hong Kong’s independence.
The Chinese government is strongly opposed to more political independence for Hong Kong.
In a statement, China’s Hong Kong and Macau Affairs Office noted candidates had been publicly advocating for independence during the election campaign.
“We firmly support the Hong Kong SAR [special administrative region] government to mete out penalties according to law,” the Chinese state news agency Xinhua quoted it as saying.
While Hong Kong is a Chinese SAR, it is run under the principle of “one country, two systems”.
This arrangement gives the former British colony a high degree of autonomy and allows it to preserve its economic and social systems until 2047.
Sunday’s election was the first in the territory since 2014’s street demonstrations, when central areas of Hong Kong were paralysed for weeks by mostly young protesters calling for more autonomy from China.