No casualty was reported in the mishap.
"The fire broke out in the engine of the train soon after it left Sampla Railway Station near Rohtak. It was stopped at Asodha Station in Bahadurgarh," a Government Railway Police official said, adding the train was coming from Pathankot side.
He said fire tenders were pressed into service and the flames were doused after a few minutes.
The passengers and driver are safe and the cause of fire is being investigated, the official said.
The train was halted for about half an hour to replace the engine, the official said, adding it later left for Delhi.