Northern Ireland's infrastructure minister said she is "deeply concerned" after a burning car was left on a railway track near Bellarena.
Translink confirmed the incident occurred around 7.45pm on Monday and involved the 1910 train from Belfast to Derry-Londonderry.
Translink Group chief executive Chris Conway said: "The train driver reacted quickly and thankfully brought the train to a stop safely, short of where the car was burning.
"The train crew ensured all safety procedures were followed with the incident swiftly reported and emergency services attended the scene."
He continued: "The train returned to Coleraine Station, where six passengers got off safely for onward connections by road. It is very fortunate that no-one has been injured in this incident."
The line between Derry-Londonderry and Coleraine was closed for a time on Tuesday morning but has since reopened.
Infrastructure Minister Nichola Mallon condemned the incident, which she said left her "deeply concerned and troubled".
"I am so relieved to hear that passengers and crew are all safe," Ms Mallon said.
The Minister continued: "It is unimaginable to think what could have happened this evening had it not been for the prompt action of the driver and crew.
"I want to express my gratitude to them and to the emergency services. I would urge anyone with any information about this incident to contact the PSNI."
Mr Conway said Translink would be working with the PSNI to investigate the incident, adding: "We utterly condemn this attack which had the potential for very serious consequences."
Watch Gareth Wilkinson's report here