Prasad had two failed attempts contesting the
1985 Karnataka Legislative Assembly election as a
Janata Party candidate and the
1989 elections as a
Janata Dal candidate. As a JD nominee, he won the MLA seat of the
Gundlupet constituency in 1994 by defeating C. M. Shivamallappa of INC. He secured 53,724 votes, whereas the runner-up C. M. Shivamallappa of Congress received just 29,668 votes, winning with a large margin of 24,056 votes. Janata Dal formed the state government in 1994 with
H. D. Deve Gowda as Chief Minister. Gowda later resigned from the post to become the
Prime Minister of India in 1996 and was succeeded by
J. H. Patel in that position until the 1999 elections. Due to internal conflicts, Janata Dal split up and Patel formed the
Janata Dal (United) faction in Karnataka and Mahadeva Prasad followed him to the new party. Prasad retained his seat by winning the 1999 assembly elections as JD(U) member, although the party did not win majority in the state. This time Prasad secured 46,757 votes and won the seat with a margin of 24,981 votes, compared to his closest contender H. S. Nanjappa of Congress, who received 21,776 votes. After the Janata Party split up, Deve Gowda formed a new faction of
Janata Dal (Secular). Prasad then switched his allegiance and joined JD(S). He won the 2004 elections for the third straight time from the same constituency. Prasad was Cabinet minister in the
N. Dharam Singh-led coalition government and headed the Ministry of Food and Civil Supplies. When
H. D. Kumaraswamy became the Chief Minister, Prasad took charge of the office of the Minister for Kannada and Culture. Prasad later left the JD(S) group and this time joined the
Indian National Congress. He won the Gundlupet Assembly seat again in the 2008 elections and "earned a rare distinction" He contested the next elections in 2013, winning again with a margin of 7,675 votes by receiving 73,723 votes compared to 66,048 votes received by C. S. Niranjanakumar of
Karnataka Janata Paksha. He took charge of state minister for Cooperation and Sugar and was also the in-charge minister of the
Chamarajanagar district. A different complaint was also filed against Prasad for allegedly not declaring 3.22 acres of land in
Arepura village of Gundlupet in his election affidavit. In March 2016, Prasad's name had appeared in news after a
Right to Information query informed that Prasad had claimed an excessive amount of as travel allowance for commuting between Bengaluru and his constituency for last three years. In June 2016, Prasad's son Ganesh Prasad was accused of running a granite quarry on government-owned land in Chamarajanagar. He was accused of illegally acquiring approximately 14 acres of land and causing a loss to the state exchequer. The opposing BJP party demanded that Prasad be sacked. Prasad, however, repudiated the claims, calling them "politically motivated". ==Personal life==