The transport company has warned that due to the emergency incident at Cupar, trains between Edinburgh, Dundee, Arbroath and Aberdeen will be affected.
Police Scotland has confirmed that they were made aware of the fire at around 5.50 am on Wednesday, and the Scottish Fire and Rescue has been contacted for comment.
The train involved is not a ScotRail train and there has not been any casualties reported.
Two drivers in Fife caught doing more than 100mph as one had kids in car
Fife wildfire: Firefighters battle blaze in field near Fairmont Hotel
Fife rapist dangled pregnant sex attack victim over railway bridge
Leven Promfest: Fife town set for weekend of live music and family entertainment
Joseph Lowther: Fife rapist committed sex attacks on women and girls over course of 20 years
A spokesperson for Caledonian Sleeper said: “One of the locomotives pulling our Northbound Highlander service to Aberdeen suffered a technical issue this morning, resulting in damage to some underframe electrical cables and some smoke.
"All of our guests and staff were safely taken off the train at Cupar as a precaution, and they are currently completing their journeys by alternative transport.
"We are sorry for the inconvenience this has caused our guests and other rail users.
"The passenger coaches were unaffected, and the defective locomotive has been removed from the train and returned to our maintenance facility.
"All of tonight’s Caledonian Sleeper services are due to run as scheduled.”
Some ScotRail trains have been diverted, and rail replacement services are being sourced, although currently, valid tickets are being accepted on Stagecoach buses within Fife.
Trains between Edinburgh and Aberdeen have been diverted via Perth and the service between Edinburgh and Arbroath has been suspended.