When he was studying at Qom Seminary, he became interested in politics under Ruhollah Khomeini. He was one of the opposition of Mohammad Reza Shah's White Revolution and accompanied with Khomeini. With Khomeini's exile, Hashemi's role in the fight against the Shah and representing Khomeini in the country was highlighted. This opposition eventually led to his arrest and imprisonment. He was arrested for 7 times from 1960 until 1979 and was in jail for four years and 5 months in total due to his clandestine activities against Pahlavi regime. Despite the anti-Western attitude of revolutionaries, he had traveled to 20 states of the United States. Although individual major pre-revolutionary speeches against Shah regime, But Khomeini acted him as financial manager of revolutionary struggle as well as connector with other revolutionary groups.
Among the groups that had a deep bond with Hashemi, was the Islamic Coalition Party, which is known as responsible for the assassination of former Prime Minister Hassan Ali Mansur. This communication was another reason for his arrest. In prison, he found the opportunity to become familiar with other groups opposed to the Shah.
After the revolution
After the victory of Iranian Revolution, Hashemi became one of the members of Council of Islamic Revolution. He was one of the powerful members of the council from its establishment. He was also deputy interior minister at that time and later became the acting interior minister.
He was one of the 28 founders of Traditional right-wing Combatant Clergy Association and also one of the members of the central committee of Islamic Republican Party at the first years of the revolution. Years later, it was him that requested IRP's dissolution. His political acumen and Khomeini's full trust helped Rafsanjani as one of the most powerful politicians in Iran at that time. At the time, he was the closest person to the Khomeini and ruled as his "eyes and ears". According to the Gold, Islamic Revolutionary Guard Corps was established with the help of Hashemi.
At Iranian hostage crisis in 1980, Hashemi Rafsanjani mentioned it as "one of the largest manufacturer in the history". However, on the tenth anniversary of the revolution, he said in an interview that according to the experiences of these years, the hostage was "wrong".
Hashemi served as one of the Tehran's Friday Prayer Imams (for next thirty years), Representative of Khomeini at Defence High Council (after death of Mostafa Chamran) and Second-in-Command of Iran's Joint Chiefs of Staff in the last year of Iran–Iraq War. He forced Khomeini to accept to end the war. Only three months after his appointment as Iran's deputy commander-in-chief, Iran accepted United Nations Security Council Resolution 598 and eight-year war was ended.