Fire crews and the police also responded after the incident occurred on the line at Stonehaven, Aberdeenshire, on Wednesday morning.
Pictures posted from the area show at least six ambulance vehicles, an air ambulance and a number of police response cars on hand and smoke billowing behind them in the background.
Network Rail said it was investigating and it is not clear if there are any injuries at this point.
A British Transport Police spokesperson said: “Officers are currently responding to an incident on the line in Stonehaven.
“We were called at 9.43am, and are on scene alongside paramedics and the fire brigade.”
The incident follows a night of flooding in the area.