Born in Hyderabad, Mahendra attended Osmania University, where he took part in the Vandemataram strike. He then moved to study at Visva-Bharati University, and finally in Burdwan. In 1942, he joined the Communist Party of India (CPI), which encouraged him to become a trade unionist. He organised unions in Burnpur and Asansol before returning to Hyderabad. He went underground to participate in the Telangana Rebellion, and spent some time in prison in the early 1950s.