Activists had occupied the Legislative Council (LegCo) building for hours after breaking away from a protest on the anniversary of Hong Kong’s transfer of sovereignty to China from Britain.
After midnight (16:00 GMT), hundreds of police secured the building following a warning to protesters to clear it.
It follows weeks of unrest in the city over a controversial extradition law.
Hundreds of thousands took part in the earlier peaceful protest – the latest rally against a proposed law that critics fear could be used to extradite political dissidents to mainland China.
The protesters have also been demanding an independent inquiry into alleged police brutality during an earlier protest on 12 June.
Hong Kong’s embattled political leader Carrie Lam held a press conference at 04:00 local time (20:00 GMT) in which she condemned the “extreme use of violence” of those who broke into the legislature.