Critics -- including protesters who poured onto the city's streets Sunday -- say the decision undermines Hong Kong's own legal system and further erodes promises of autonomy made before the former British colony was returned to China in 1997.
The two lawmakers, Sixtus "Baggio" Leung and Yau Wai-ching, had their oaths of allegiance rejected
after inserting curse words and waving a flag bearing the words "Hong Kong is not China."
China's top ruling body, invoking a rarely used power, said Monday that anyone who refuses to read the oath should be disqualified from holding office.
"Reading the vows in any dishonest, ungraceful manner is also a refusal to the oath, and it shall be void," the ruling said, according to state news agency Xinhua.
Leung and Yau were among several young politicians elected in a September vote
that attracted record turnout, who favor greater autonomy or even independence for Hong Kong
Their right to retake their oaths is also being challenged by the Hong Kong government in local courts.
Hong Kong's leader, CY Leung, said Monday that he would implement Beijing's decision.
Three other young pro-democracy lawmakers, elected at the same time as Yau and Leung, accused Beijing of "exploiting the controversy surrounding (the oaths) to trample on the Hong Kong legal system and the political rights of the people of Hong Kong."
Hong Kong's mini-constitution, the Basic Law, "no longer protects the democratic rights of Hong Kongers," Nathan Law, Lau Siu Lai and Eddie Chu said in a joint statement.
Police used pepper spray to disperse thousands of protesters that had gathered outside China's representative office in Hong Kong -- a symbol of Beijing's rule -- on Sunday night ahead of the ruling.
Clad in black and wielding umbrellas to protect themselves, they brought to mind the pro-democracy street protests that convulsed the city for two months in 2014.
China has reacted angrily to calls for Hong Kong independence, with some senior officials calling for "separatists" to be prosecuted.
On Monday, the Standing Committee of the National People's Congress -- China's top ruling body -- said it had "unanimously" passed its interpretation of Hong Kong's Basic Law, the document hashed out by China and the UK ahead of the handover, which is the city's de facto constitution.
The ruling focuses on Article 104, which says that members of Hong Kong's Legislative Council "must swear allegiance to the Hong Kong Special Administrative Region (SAR) of the People's Republic of China."
The Standing Committee has only invoked its power to interpret the Basic Law on four previous occasions, which have often drawn controversy.
Rimsky Yuen, Hong Kong's Secretary for Justice, dismissed concerns Monday that Hong Kong's judiciary had been compromised.
"Both judicial independence and interpretation can coexist, and they do under our constitutional framework," he said.
A top Hong Kong government lawyer, Benjamin Yu, said last week
that it wouldn't be necessary for Beijing to intervene, and the issue could be handled in the city's courts.