The incident occurred when the train reached Sankagiri in Salem district.
However, there was no casualty.
Railway Police sources said as an exploding sound was heard immediately after the engine caught fire, allegedly due to a technical snag, passengers became panicky.
The train was immediately stopped and all the passengers were made to alight from the train.
Fire fighting units battled hard for nearly three hours to bring the blaze under control.
A new engine was summoned and the train later left for Yeshwantpur after a delay of three hours. About 14 trains, passing through the section, suffered a delay of three hours following the fire.