The incident happened near Cupar.
Firefighters attended the scene about 3pm yesterday with all passengers safely taken off the train.
A Scottish Fire and Rescue Service spokesman said: “We were alerted at 3:06pm on Thursday, February 1 to reports of a small fire which had taken hold underneath a train carriage.
“Operations Control mobilised three fire appliances to Cupar railway station where all passengers had safely left the train prior to firefighter’s arrival.
“Crews currently remain in attendance.”
Commuters travelling through Fife faced delays after a warning of disruption by ScotRail following the incident.
Video supplied by Carmel Massey