Protesters broke windows and glass doors, but were pushed back by riot police waiting inside the building, which also houses the Central Election commission.
Hundreds of protesters were then arrested as they clashed with police, who used stun grenades and truncheons to quell the activists.
Earlier, an opposition candidate, Vladimir Neklyayev, 64, was seriously injured when he was beaten by riot police while leading a few hundred of his supporters to the demonstration. His wife said he was taken to hospital.
In what is thought to be the biggest opposition rally since 1996, about 40,000 opposition activists rallied in Minsk to call for Alexander Lukashenko, the longtime authoritarian leader, to step down. Exit polls last night indicated he had won his fourth consecutive election with around 72 per cent of the vote.
Mr Lukashenko, who has ruled the former Soviet republic of 10 million for the past 16 years and has been dubbed "Europe's last dictator", was running against nine opposition candidates in a battle that was seen as fairer than in previous years.
The opposition candidates have already declared the elections fraudulent, despite being given more freedom to campaign and access to national airtime for each candidate than in previous polls in 2001 and 2006.