Post-presidency, Rafsanjani delivered a sermon at Tehran University in the summer of 1999 praising government use of force to suppress student demonstrations.
In 2000, in the first election after the end of his presidency, Rafsanjani ran again for Parliament. In the Tehran contest, Rafsanjani came in 30th, or last, place. At first, he was not among the 30 representatives of Tehran elected, as announced by the Iranian Ministry of the Interior, but the Council of Guardians then ruled numerous ballots void, leading to accusations of ballot fraud in Rafsanjani's favor.
In December 2006, Rafsanjani was elected to the Assembly of Experts representing Tehran with more than 1.5 million votes, which was more than any other candidate. Ahmadinejad's opponents won the majority of local election seats. On 4 September 2007 he was elected Chairman of the Assembly of Experts, the body that selects Iran's supreme leader, in what was considered a blow to the supporters of Mahmoud Ahmadinejad. He won the chairmanship with 41 votes of the 76 cast. His ultraconservative opponent, Ayatollah Ahmad Jannati, received 31 votes. Rafsanjani was re-elected to the position on 10 March 2009, running against Mohammad Yazdi. He received 51 votes compared to Yazdi's 26. On 8 March 2011, he withdrew from the election and Ayatollah Mohammad Reza Mahdavi Kani was elected as his replacement.
Rafsanjani has advocated freedom of expression, tolerance and civil society. In a speech on 17 July 2009, Rafsanjani criticized restriction of media and suppression of activists, and put emphasis on the role and vote of people in the Islamic Republic constitution. The event has been considered by analysts as the most important and most turbulent Friday prayer in the history of contemporary Iran. Nearly 1.5 to 2.5 million people attended the speech in Tehran.
2009 election protests
During the 2009 Presidential election, Rafsanjani's former rival and incumbent president, Mahmoud Ahmadinejad, won a disputed landslide victory over challenger Mir-Hossein Mousavi. His daughter was arrested on 21 June by plain clothes Basij during the subsequent protest and later sentenced to six months in jail on charges of spreading propaganda against the Islamic Republic.
Ayatollah Hashemi Rafsanjani was chairman of the Assembly of Experts, which is responsible for appointing or removing the Supreme Leader, who has been rumored to not be in the best of health. After the disputed results of the election were certified by the Supreme Leader, Rafsanjani was reported to have called a meeting of the Assembly of Experts, but it is unknown what the outcome or disposition of this meeting actually was. During this time Rafsanjani relocated from Tehran to Qom, where the country's religious leaders sit. However, for the most part, Rafsanjani was silent about the controversial 12 June election and its aftermath.
On 17 July 2009, Rafsanjani publicly addressed the election crisis, mass arrests and the issue of freedom of expression during Friday prayers. The prayers witnessed an extremely large crowd that resembled the Friday prayers early after the revolution. Supporters of both reformist and conservative parties took part in the event. During prayers, Rafsanjani argued the following:
All of us the establishment, the security forces, police, parliament and even protestors should move within the framework of law... We should open the doors to debates. We should not keep so many people in prison. We should free them to take care of their families. ... It is impossible to restore public confidence overnight, but we have to let everyone speak out. ... We should have logical and brotherly discussions and our people will make their judgments. ... We should let our media write within the framework of the law and we should not impose restrictions on them. ... We should let our media even criticize us. Our security forces, our police and other organs have to guarantee such a climate for criticism.
His support for the Green Movement reinvigorated his image among the urban middle-class segments of Iranian society who made up the bulk of the movement and solidified Rafsanjani's role as a backer of factions within Iran that advocated the reform of the system to ensure its survival.
Assembly of Experts election
On 8 March 2011 Rafsanjani lost his post as chairman of the powerful Assembly of Experts, replaced by Ayatollah Mohammad-Reza Mahdavi Kani. Rafsanjani stated that he withdrew from the election for chairman to "avoid division." The loss was said to be the result of intensive lobbying "in recent weeks" by "hardliners and supporters" of President Mahmoud Ahmadinejad, and part of Rafsanjani's gradual loss of power over the years.
2013 presidential elections
Hashemi announcing his candidacy with his daughter, Fatemeh accompanied him.
On 11 May 2013, Rafsanjani registered for the 14 June presidential election with just minutes to spare. Former reformist president Mohammad Khatami endorsed him. However, on 21 May 2013, Iran's electoral center, Guardian Council disqualified him from standing in the presidential election. On 11 June 2013, Rafsanjani endorsed moderate Hassan Rouhani in the elections for Iran's presidency saying the candidate was "more suitable" than others for presidency.
Reformers had enjoyed his support in recent years, helping to tilt the balance of power towards more moderate forces who managed to win the presidential poll in 2013 with the victory of Hassan Rouhani and parliamentary elections in 2016.
Rafsanjani could not act as a political horse trader—for example, he could not prevent reformist candidates from being disqualified—but his role in guiding reformist politicians was a crucial one and, up to a point, he was able to influence Khamenei by preventing him from making one-sided decisions. Hardliners now have a chance to completely surround the Supreme Leader and block moderate influences. Rafsanjani played politics the way it was played during the time of Ayatollah Khomeini—or at least, that is what he wanted you to believe—but with his death the so-called "Imam's Line," key figures from the beginning of the Revolution, who were close to Khomeini—is near its end.
He also kept his traditional connections with the clergy in the holy city of Qom and with conservative forces within the political establishment, which made it difficult for hardliners to form a strong front against moderate forces.
After winning reelection to his seat at Assembly of Experts as Tehran district's first person, Rafsanjani announced that it was the last time that he joined an election as a candidate and will be retired from politics at the end of the current term. He also said "Now I can die with peace of mind" after seeing election of a moderate parliament in the 2016 legislative election.