Police said the grazing herd had started running helter skelter, apparently on suddenly hearing the horn of the Guruvayur-Chennai Express and tried to cross the track.
Officials said there was no delay in the onward journey of the train.
They said the train driver had to maintain a certain speed on that curve in the track and sudden application of brakes would have resulted in derailment.