The leaders of Ghana, Ivory Coast and Sierra Leone were at the palace in the Liberian capital, Monrovia, when the fourth floor of the six storey building caught fire.
Everyone escaped unharmed and authorities are investigating the cause of the fire.
Liberia is marking 159 years of independence.
The country on the west coast of Africa was founded by freed American slaves in 1847.
Sirleaf had been joined by John Kufuor, the president of Ghana, to switch on street lights in eastern Monrovia as part of the celebrations earlier on Wednesday.
Running water was also turned on in some parts of the capital to mark the anniversary.
It is the first time such services have been available in Monrovia since civil war ended three years ago.
Engineers had water flowing to 30 percent of Monrovia and generator-powered street lights on one road.
Sirleaf had pledged during her election campaign to restore electricity to the capital in six months.
Liberia is slowly recovering from its 1989-2003 civil war.
The war destroyed most of the country's infrastructure, killed 200,000 people and displaced half of Liberia's 3million people.
Monrovia has not had running water in 15 years. The city's water treatment plant was destroyed during the civil war. Since then, people have relied on wells, hand-pumps and bottled water.
The city's street lights were also damaged during the war. Residents in Monrovia have long relied on generators, candles and lanterns.
Kufuor said: "As lights dispel darkness, so with the restoration of power to Liberia, the period of gloom and darkness engendered by political turmoil must come to an end."
Ghana had supplied technicians, generators and poles to help erect the street lights.
Sirleaf, the first elected female president in Africa's history, took over from the interim government in January.