He was elected to Rajya Sabha 2006-12. He was a great protagonist of Telangana and had Leftist leanings. In May 2013, Keshava Rao quit Indian National Congress, of which he was a senior person, as the party did not meet the deadline to take a decision on the issue of creation of a separate state of Telangana. He later joined the Telangana Rashtra Samithi, a regional Party which was spearheading the movement for creation of a separate state, along with two other members of Parliament. He was appointed as the Secretary General of Telangana Rashtra Samithi and its chairman of national affairs, as second in command. Dr. Rao was elected to Rajya sabha in 2014 from TRS Party for a six year term. He was nominated as the Chairman (Leader) of the TRS Parliamentary Party, which was the eighth largest party in the Parliament with 12 members.