No one was injured in the blaze which police are treating as 'wilful'.
Emergency crews were called out to Victoria Hospital in Kirkcaldy last night (Tuesday).
Four fire appliances were called to the main building at 8.47pm to a blaze in the ground floor male toilets.
The accident and emergency's observation ward had to be evacuated due to the amount of smoke.
Police believe the blaze, which was contained to the male public toilets on the ground floor, was started deliberately.
The area is cordoned off but the hospital remained open as normal.
No patients or staff were injured in the incident, which was contained to the toilet area.
An investigation is underway. Police remain on scene whilst this is carried out.
A spokesperson for NHS Fife said: "Last night the male public toilet near the main entrance to the Victoria Hospital in Kirkcaldy was wilfully set alight around 9pm.
A Police Scotland spokesperson said: “Around 9.45pm on Tuesday May 16 officers received a report of a fire at a hospital in Kirkcaldy.
“The fire is being treated as wilful and enquiries are ongoing.”