Services between the capital and Glenrothes, Cowdenbeath, Kirkcaldy, Dundee, Aberdeen and Inverurie were all suspended by 6.10am on Tuesday morning.
Passenger services have since been restored, but are still subject to delay.
The disruption was caused by a freight train striking a tree felled overnight by the stormy weather.
Suburban rail services in the southside of Glasgow were also disrupted after a tree was found to be blocking the line at Neilston in East Renfrewshire, while a similar blockage was cleared from the line near Bellshill.
ScotRail said last night that it had ‘rapid response’ chainsaw teams on call ready to deal with any debris caused by Storm Ophelia.
In a statement posted on its website, ScotRail said: “Unfortunately a freight train has struck a tree in the Markinch area and all services in the Fife area are currently suspended.
“If you have a valid ticket you can use it on Stagecoach services in the Fife area and between Aberdeen and Inverness. Just present your ticket to the driver on board.”