On 23 May 2019, Rai became Minister of State for Home Affairs.[9] Rai joined politics from his college ABVP unit. He was elected for students union President in his college. Rai in the year of 2000 Bihar Assembly election got a ticket and won from Hajipur. He won the seat four times consecutively. In the 2014 general election Rai got the ticket for Parliamentary election from the neighbouring district as his home constituency is reserve seat for SC candidates. He won the election and became a Member of Parliament from Ujiarpur. In the 2016 Bihar Vidhan sabha election BJP has tried to promote him as Yadav[2] face to lure declining RJD voters. He has been made BJP Bihar President and after the 2019 election, he was made State Home Minister in NDA2 Council of Ministers.
Post held
Member of Bihar legislative Assembly - 2000, Feb 2005, October 2005 and 2010
2014 & 2019 - MP Ujiarpur constituency
September, 2014- August, 2018- Member of Standing committee on Agriculture
September, 2018-May 2019- Member of Standing committee on Commerce
May 2015- Member of Joint committee on Land acquisitions, rehabilitation and Right to get appropriate compensation for relocation and transparency (second amendments) Bill 2015.[10]