As a freedom fighter from his young days in 1936, Pandit Devendra Shastri ji had always raised his voice against injustice and appeasement. Even in 1947, he had taken great personal risk on his own life to ensure that Hindus from Sheikhpura, Lyallpur, part of Pakistani Punjab, were evacuated safely. Being a co-founder of the Jana Sangh, he did several pro-people activities that earned him immense popularity and goodwill. With the help of shramdaan, he got an irrigation canal built in Bhagwanpur village of Haridwar, which Dr. Syama Prasad Mookerjee later inaugurated. Having participated in the 1953 Kashmir Bachao Andolan, Shastri ji had to spend three months in captivity in Bijnor, Uttar Pradesh, and Delhi after courting arrest.
Between 1951 and 1977, Shastri ji also served as the Sangathan Mantri for Western Uttar Pradesh. In 1977 after the Emergency, he got elected as the Member of the Legislative Assembly from Dehradun. At the same time, he was appointed Vice President of Uttar Pradesh Bharatiya Janata Party and President of the Uttaranchal Pradesh Sangharsh Samiti. Later, he became a member of the Uttar Pradesh Legislative Council as well, while remaining a lifelong member of the Jan Sangh earlier and the Bharatiya Janata Party later. He was even put in jail for nearly three years for leading the campaign for a separate Uttaranchal state in various places, along with raising issues of the ordinary people. Throughout his life, Pandit Devendra Shastri was known for his principled based politics, selfless service, and nationalism.