The flat above the Woodside Inn, Glenrothes, went on fire on Friday morning.
The pub itself emerged unscathed, but the incident is under investigation.
The fire broke out around 7:30am, sparking long tailbacks on Woodside Way as emergency services raced to the scene.
Fife Council slams couple who painted front door Ukrainian yellow
in Pictures: These P1 school photos from 1994 will spark many memories
Glenrothes sisters are British Highland dancing champions
Cyclist taken to hospital after crash on A92 in Fife
St Andrews café owner provides extra help to support staff with Cost of Living crisis
Five fire engines were dispatched to the incident, and an ambulance also attended, but no-one was hurt.
Police investigating the blaze say it was wilful and have appealed for anyone with information to come forward.
Detective Sergeant Alasdair Young said: “Inquiries are ongoing.
"I would appeal to anyone who was in the area of Woodside Way at the time and who witnessed anything suspicious to contact us.
"I would also ask anyone with personal footage that may assist our inquiry to contact officers.”
Call Police Scotland on 101 quoting reference 0556 of May 6.