Former Umbrella Movement protest leader Nathan Law was among the group barred by the High Court judgement in a case brought by the city's Beijing-friendly government.
It sought to remove them from the legislature for changing their oaths of office to reflect their frustrations with Chinese authorities last year.
The judgement comes after Beijing issued a special interpretation of Hong Kong's mini-constitution, the Basic Law, to insist that oaths be taken in a "sincere and solemn" manner.
The High Court said the interpretation was "binding" on all Hong Kong courts.
"The word 'solemn' bears the commonly understood meaning of being dignified and formal," the judgement said.
Concerns that China is squeezing semi-autonomous Hong Kong have sparked calls by some activists for self-determination or even independence for the city which have angered China.
The four legislators dismissed Friday were not staunchly pro-independence but two of them have advocated self-determination for Hong Kong.
The interpretation last November was prompted by a string of protests during the swearing in of lawmakers following citywide elections.
Two pro-independence legislators have already been disqualified by the High Court after they inserted expletives and draped themselves with "Hong Kong is not China" flags during their oath-taking.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)