Appointed in 2016 as the union minister of state for HRD in the previous Modi government, Pandey had resigned in August 2017 and given charge of the state which sends 80 parliamentarians to the Lok Sabha.
Dr.Pandey spent five months in prison during the Emergency. In 1978, he joined Rashtriya Swayamsevak Sangh. He took part in the Ram Janmabhoomi movement and was booked under the National Security Act by the Mulayam Singh Yadav-led state government. In 1991, Pandey was elected to the Uttar Pradesh Legislative Assembly for the first time.In 1996, he was re-elected to the assembly. He received the portfolio of Minister of State for Housing and Urban Development the following year in the Kalyan Singh ministry. He also served as Minister of State for Planning (Independent charge) between 1998 and 2000, and Minister of State, Panchayati Raj between 2000 and 2002. Ahead of the 2014 Indian general election, Bharatiya Janata Party announced that Pandey would contest from the Chandauli constituency of Purvanchal.He was elected to the Lok Sabha after defeating his nearest rival Anil Maurya of the Bahujan Samaj Party by a margin of approximately 150,000 votes.
Subsequently, he was made a member of Standing Committee on Rural Development and Consultative Committee for Ministry of Steel and Mines. On 5 July 2016, in a major cabinet reshuffle, Pandey took the oath of office as Union Minister of State for Human Resource Development in the First Modi ministry. On 31 August 2017, he was replaced by Satyapal Singh.That same day, he was appointed president of the Uttar Pradesh unit of the Bharatiya Janata Party. He replaced Keshav Prasad Maurya. In the Cabinet announcement made on 31 May 2019, Pandey has been given the post of Minister of Skill Development and Entrepreneurship in the 17th Lok Sabha under Prime Minister Narendra Modi.