During the War of the Ring, on March 9, 3019, Prince Imrahil led a company of Swan Knights and 700 men at arms to Minas Tirith to help defend the City. Prince Imrahil led the sortie that rode to the aid of Faramir and the rear-guard who were retreating from Osgiliath when the forces of Sauron overran the Pelennor Fields on March 13. Gandalf rode with them, and the Winged Nazgûl fled before him. The Knights of Dol Amroth rescued Faramir from the Southrons. Faramir was poisoned, and Imrahil carried his nephew back to the City on his horse. Gandalf then took command of the besieged city and Prince Imrahil assisted him, because Denethor in his madness retreated to the White Tower with his dying son, and forgot about the city.
While paying his respect to the procession bearing the body of King Théoden of Rohan at the Battle of the Pelennor Fields on March 15, Imrahil noticed that the Rohirrim also bore the body of Éowyn. He perceived that she was still alive and he sent a man to the City for help.
Éomer and his Riders were outnumbered, but Imrahil then rode into battle, and he came to their aid. Shortly after, Aragorn arrived in the black ships of the Corsairs, and the tide of the battle was turned. After the Pelennor fields had been cleared, Aragorn, Éomer and Imrahil rode to the Gate of Minas Tirith.
Imrahil recognized that Aragorn was the rightful King, but he agreed that it was wise for Aragorn to wait to enter the city, because Imrahil knew his brother-in-law Denethor was strong-willed and proud. When Imrahil learned that Denethor was dead and Faramir dying, he suggested that Aragorn be summoned, remembering that the Kings of old were great healers. Aragorn came at Gandalf's request to heal the wounded Faramir, Éowyn and Merry, but he declared that Prince Imrahil should rule the City until Faramir awoke, in effect granting Imrahil the position of Steward.
During the debate of the Captains of the West, Gandalf proposed that they march to the Black Gate to distract Sauron's attention from Frodo the Ring-bearer. Imrahil said that he would follow his liege Aragorn, but since Minas Tirith was under his command the Prince advised that some should remain to defend the City. In the end it was decided that an army of 7,000 would ride forth. Imrahil laughed and said:
"Surely this is the greatest jest in all the history of Gondor: that we should ride with seven thousands, scarce as many as the vanguard of its army in the days of its power, to assail the mountains and the impenetrable gate of the Black Land! So might a child threaten a mail-clad knight with a bow of string and green willow!" (The Return of the King: "The Last Debate")
The Host of the West left Minas Tirith on March 18. Bypassing Minas Morgul and marching north, the heralds announced the coming of King Elessar at Imrahil's advice. When Sauron's forces emerged from the Black Gate on March 25, Imrahil stood on the front line with his men. They fought the Battle of the Morannon (Black Gate) until the One Ring was destroyed.
Prince Imrahil was present at the celebrations of the field of Cormallen, and the coronation of Aragorn as King Elessar, and rode with the funeral procession of King Théoden to Rohan, remaining in Edoras after the King's burial on August 10. Imrahil and Éomer became great friends, and in T.A. 3021 Éomer wed Imrahil's daughter Lothíriel.
After the War of the Ring, Prince Imrahil and his nephew Prince Faramir were King Elessar's chief commanders. Imrahil was also part of the Great Council of Gondor, and remained an advisor of the King.
Prince Imrahil died in the year 34 of the Fourth Age, and was succeed by his eldest son Elphir, who continued the line of Princes.