Officers have arrested a 27-year-old man on suspicion of arson after the fire in the town of Ljusdal in Gävleborg, south of Sundsvall.
No one is understood to have been injured, but the building was badly damaged by the flames and smoke.
Police said they caught the suspect close to the town hall shortly after the alleged attack, which took place on Wednesday morning.
“He walked into the reception area of the municipal building, poured flammable liquid, set it alight and then walked out,” Mikael Hedström, a police spokesperson, told the TT news agency.
“There is no doubt that he is the right man, based on the testimonies we have,” he added.
Police also revealed that the suspect is from the Västernorrland region.
A number of public sector buildings have been targeted in recent months, although most of the planned attacks have either been foiled or turned out to be a hoax.
In May, a suspected bomb left inside Gothenburg City Hall during the morning rush hour did not explode when bomb squad officers attempted to detonate it.
The previous month it was reported that a lone man had entered county council offices in central Stockholm with an unspecified “dangerous object in his hand” after leaving a suspicious backpack at the entrance of the building. The suspect was arrested at the scene.
And earlier this month two suspicious objects were found outside a police station on Kungsholmen island in the Swedish capital, but turned out to be harmless.
There is no suggestion that the incidents are linked.