The incident occurred near the Daliganj railway station in the state capital.
Railway officials rushed to the accident site and till early morning work was underway to bring the derailed coaches back on track and restore traffic on the section.
The impact of the collision derailed four general sleeper coaches. Thankfully the train was at the outer signal of the station and hence not at high speed, an official said, adding otherwise the accident would have been deadly.
Passengers were immediately taken off the train and moved to the station. An explanation has been sought into how the stray cattle found their way onto the tracks.