The driver of the 'Karaikudi-Tiruchirappalli' passenger train was quick to take action and immediately switched off the power supply and put out the fire using fire extinguisher, they said.
The passengers noticed smoke from the cable junction between the third and fourth coach when the train was waiting for signal and jumped off it in panic.
No one was injured, the officials said.
The link had not been properly insulated and therefore rain water stagnated leading to a short circuit, they added.
The railway police have conducted an inquiry, officials said, adding that the train reached here after a delay of about 30 minutes.