Sixtus Leung and Yau Wai-ching inserted curse words during their oath of allegiance, which was subsequently rejected by Beijing.
China's parliament has barred two pro-independence lawmakers, Sixtus Leung and Yau Wai-ching, from taking office in Hong Kong's legislature on Monday after they used provocative wording in their oath of allegiance.
They also waved a large pro-independence flag bearing the words "Hong Kong is not China."
Beijing's involvement in Hong Kong has caused outrage over the past few weeks which resulted in residents from the autonomous city pouring onto the streets to protest Chinese rule.
In its ruling, the National People's Congress (NPC) interpreted a section of Hong Kong law which says "if any official who does not swear the oath properly, they cannot take office".
Hong Kong has been ruled by China since 1997. It was handed over by the United Kingdom for a 50-year period.
It is governed under a "one country, two system" principle.
"The Central Government is highly concerned about the grave dangers the Hong Kong independence forces bring to the country and to Hong Kong," parliament's Basic Law Committee chairman Li Fei said.
Independent Hong Kong lawmaker Eddie Chu said that Beijing's "needless intervention" causes a political dispute in the city which a local court could have handled.
China is trying to create a rhetoric to prevent movements of "particularly, young people in seeking self-determination," Chu added.
According to the ‘one country two system' formula, Hong Kong has wide-ranging autonomy, including constitutional freedom guided by a mini-constitution called the Basic Law.
The city's residents are protesting against China for breaking the autonomous rules of the city which they say will lead to a full invasion by Beijing.