Rai, first Chief Minister of Province-1, started his political journey being associated with the student wing of the CPN-UML in 2044 BS. He became Bhojpur district committee member of the party in 2049 BS. He was elected central committee member of the party through the ninth general convention in 2071 BS. Rai served as the government spokesperson and Minister for Communications and Information Technology in 2072 BS. He was elected provincial lawmaker in 2074 BS and was elected parliamentary party leader for the province. He was appointed Chief Minister in the same year.