Firefighters were called to the bridge a short distance from Knaresborough station by the signalman at 11.26pm on Thursday, where they found the two-unit train ablaze.
Firemen from Knaresborough, Harrogate, Boroughbridge, Ripon and Acomb used breathing apparatus and two water jets to douse the train high above the River Nidd, a North Yorkshire Fire and Rescue Service spokeswoman said.
The fire service could not confirm if the train was carrying goods or passengers, although there were no persons involved other than the driver.
The spokeswoman said: “When we took the call there were no persons on the train and the driver had evacuated. The train is on the Harrogate side of the viaduct and because of where it is, it is hard to get to.”
The 19th century viaduct is on a stretch of line between Knaresborough and Harrogate.
Train journeys using the line between Knaresborough, Harrogate, Leeds and York are unaffected during this morning’s rush hour.
In a separate incident, a giant hole tore apart a train bridge causing traffic chaos near the East Yorkshire town of Howden.
Half of the A614 train bridge collapsed into a ditch unexpectedly and has been closed to traffic because of the gaping hole which was surrounded by rubble and water spraying out of a broken pipe.
Yorkshire Water contractors were at the scene on Thursday to fix a cracked water main and a temporary walk way was also constructed - but trains were still able to travel along the line.
A Network Rail spokesman said: “Overnight a structure which is owned by Network Rail suffered a partial collapse which has resulted in the closure of the A614 near Howden.
“The cause of the collapse is still under investigation, and specialist structural engineers as well as engineers from Yorkshire Water and the East Riding of Yorkshire are currently on site assessing the damage and making the area safe.
“Once a full assessment has been made, plans can be made to carry out the repairs, but safety is our absolute priority at this time and we advise people to avoid the area as the road will be closed for the foreseeable future.”
It is a decade since the same bridge collapsed in 2006 - causing months of misery for motorists.