The Italian giants were facing Genoa in Serie A and took a lead in the 87th minute thanks to a goal from Christian Pulisic.
But as Milan were playing down the clock, goalkeeper Mike Maignan found himself in hot water after catching Caleb Ekuban with his knee.
Maignan's challenge was sent to VAR review with the decision being made that his tackle was deemed to be serious foul play, meaning that he was sent off.
With just mere minutes left and no substitutions left for Stefano Pioli to make, Giroud showed why he's the ultimate team player by donning Maignon's gloves and taking his place between the sticks.
Seeing the 37-year-old in a goalkeeper's jersey was a sight to behold, but little did fans know that the France's all-time leading goalscorer was a dab hand being the last line of defence.
MORE ON OLIVIER GIROUD
Australia star Cummings finally gets Giroud's shirt following World Cup dispute
rival
Benzema called Giroud a 'go-kart' but AC Milan star now firing France to World Cup
Genoa were pushing forward for an equaliser when a ball was played over the top of the AC Milan defence and into the path of the attacker.
But showing no fear, Giroud was quick off his line to intercept the ball with his hands before pouncing on the ball and holding it safely to his chest.
The drama wasn't finished yet though, with Genoa's goalkeeper also being sent off in the 103rd minute after going up for a corner and catching Fikayo Tomori with a wild lunge.
Thankfully for Giroud, his stop was enough to earn a victory for AC Milan, preserving their spot at the top of Serie A going into the international break.