Emergency services raced to the scene in Loughborough Road in Kirkcaldy after reports of a blaze at the historic merchants house known as Eastbank House.
The listed building had been empty since the school moved into its new campus in 2016.
The school grounds had been fenced off pending partial demolition.
The drama began around tea time when smoke and flames were seen billowing out of the roof. Five fire crews tackled the blaze while police cordoned off the area.
There are no reports of any injuries.
Police Scotland confirmed it was dealing with ‘’a substantial fire.’’ The main focus of fire crews’ attention was EastBank House which sits next to Sinclairtown Library. The roof appeared to have collapsed in the fire.
Fire crews came from Kirkcaldy, Methil and Burntisland, and they could be seen working at height and on the ground to contain the blaze.
The building has a long history. The baronial home was built around 1870 by the Earl of Rosslyn, and then bought by Henry Hutchison around 1902 before becoming part of Viewforth in 1929.
It was also used as a base for teaching children with learning difficulties, as well as an overspill for the secondary school until its move into a purpose built campus at Windmill Road.
An investigation into the cause of the fire is now underway
This report was originally published in our sister title Fife Today.