Mulayam Singh Yadav was among the first to get off the special train as it arrived at platform number 1 of the Lucknow railway station, where health officials, policemen and news photographers waited for them.
The 02121 Shramik Special carried over 800 others from Maharashtra's Nashik, all stranded there for weeks after a lockdown to fight coronavirus was imposed nationwide.
While Uttar Pradesh has already brought in several bus-loads of workers back to the home state, Yadav's group is the first batch to be brought home to the state by train.
Thirty-two buses waited outside the station to take the labourers to their onward journey to different districts.
Eager to reunite with his family in Janunpur's Machlishahr, Yadav said, "It is a matter of barely a few hours."
Surya Jaikumar from Sonbhadra said, "We faced no problem of food and water during our journey. Now, I am looking forward to return back to my village."