In 2019 he contested Shrawasti as the candidate of the SP–BSP–RLD alliance on the BSP symbol, polled 4,40,944 votes and defeated sitting BJP MP Daddan Mishra by 5,320 votes.
He later moved to the Samajwadi Party and retained Shrawasti in 2024 with 5,11,055 votes, defeating BJP's Saket Mishra by 76,673 votes. In the Lok Sabha he has spoken on the COVID-19 pandemic, the railway budget and the rural employment bill.