Ashok Rai started student politics in 2029 BS and worked in different responsibilities of CPN-ML. He became a central committee member of CPN-ML in 2046 BS and was re-elected central member through the seventh general convention held in Janakpur in 2059 BS. He became a standing committee member of CPN-UML in the same year and was elected vice-chairman on 2069 BS through the eighth general convention. He then joined Sanghiya Samajbadi Party in 2069 BS to become the party chairman and is currently Federal Council Chairman of Janata Samajbadi Party Nepal.
Rai was elected lawmaker from Khotang in elections held in 2048 BS and 2015 BS and became a lawmaker in the Constituent Assembly in 2070 BS through a proportional representational system. He also served as Minister for Transport and Minister for Health in 2051 BS and 2062 BS respectively.