Pandey was a trusted man of
Mulayam Singh Yadav and he has been jailed several times in his early political career. He was active in political protests since his student days. He won his first assembly election in 1980 as a candidate of
Janata Party from Itwa Assembly constituency. He repeated this victory in 1985 and 1989, as a candidate of
Lok Dal and Janata Party respectively. He lost the assembly elections of 1991 and 1996. In 1996, he was a candidate of Samajwadi Party. Pandey, however, was made minister of health in Mulayam Singh Yadav government in 1991 and in the year 1993, he was made minister for labour and employment. He registered four electoral victories in assembly elections of 2002, 2007, 2012 and 2022 thereafter. Pandey was a senior leader of Samajwadi Party, having served in Uttar Pradesh Legislative Assembly for multiple terms. In 2024, he was one of the most eligible contender for the post of leader of opposition besides Indrajeet Saroj and Shivpal Yadav in Samajwadi Party. However, he was chosen over others by party chief Akhilesh Yadav with the strategy to slice BJP's upper caste base. In July 2024, Pandey was formally appointed the leader of opposition in Uttar Pradesh Legislative Assembly. ==Conferences attended==