He entered politics at 21, took part in the anti-Emergency movement as district co-convener of the Sangharsh Samiti in Ayodhya, and worked with Chaudhary Charan Singh's Lok Dal.
He was elected MLA from Sohawal (SC) in 1977, 1985, 1989, 1993, 1996, 2002 and 2007, and from Milkipur (SC) in 2012 and 2022 – nine terms in all. He served as a minister six times, in the Janata Party governments of Ram Naresh Yadav and Banarasi Das and the SP governments of Mulayam Singh Yadav and Akhilesh Yadav.
A founding member of the SP in 1992, he was named national secretary and a member of its central parliamentary board, and has also been the party's treasurer and is a national general secretary. He sided with Akhilesh Yadav in the party's 2017 leadership contest.
In 2024 the SP fielded him from Faizabad against two-time BJP MP Lallu Singh. He polled 5,54,289 votes and won by 54,567 votes, a result widely seen as one of the most symbolic of the election. He resigned his Milkipur Assembly seat on entering the Lok Sabha.