For part of the Iran–Iraq War, Zarghami was in charge of teams tasked with the domestic production of missiles, a necessity due to many countries' refusal to sell weapons to Iran. Zarghami eventually departed from the IRGC as the rank of general; he has cited his interest in politics as his motivation for leaving. In 1995, he became deputy cultural minister overseeing cinematic affairs; he held the post for two years, during which he implemented tough restrictions on content, despite the distaste of many cinema activists. During this time, President Hashemi Rafsanjani distanced himself from Zarghami. Contradicting his harsh tenure, he has claimed to have 'paved the way' for artists in Iran. In 2004, Supreme Leader Ali Khamemei appointed him to head of the state broadcasting service, Islamic Republic of Iran Broadcasting (IRIB), a post that he held for ten years. His predecessor was Ali Larijani. Throughout Mahmoud Ahmadinejad's presidency, Zarghami was accused of covering events in a biased manner. Zarghami developed a close relationship with Ahmadinejad, which he has maintained; Zarghami accompanied the then-president Ahmadinejad on his trip to the United Nations General Assembly in 2010, and the two often took phone calls with one another during the latter's term in office. After the 2009 Presidential Elections protests, many blamed Zarghami and the IRIB's biased coverage for provoking reformists to mobilize. His tenure ended in 2014, after which he became more of an active presence on social media platforms; he held meeting with controversial Iranian politicians from the left and right, portraying himself as an "inclusive politician".