The warning asks anyone living near Dunino to close their windows and stay indoors while firefighters look to get the fire under control.
It is understood that this may relate to asbestos potentially being in the affected building.
“We advise the public to avoid the area and ask that local residents in Dunino and the surrounding areas remain indoors if possible and keep their windows and doors closed due to smoke.”
A Scottish Fire and Rescue Service spokesperson said: “We were alerted at 6.20am on Tuesday, March 22, to reports of a fire within a single storey farm building near Dunino, Fife.
“Operations control immediately mobilised four fire engines to the location and firefighters wearing breathing apparatus are extinguishing the fire.
“Crews will remain at the scene after until the area is made safe.”