The European champions said they activated a 12-month option in Giroud's deal back in April as they prepared for the defining weeks of the season.
Giroud scored six times in last season's Champions League, making him the Blues' top scorer in the competition, although he started only twice and did not feature in the 1-0 final win over Manchester City.
The 34-year-old made only 12 starts in all competitions in 2020-21 and had been tipped to join Milan on a free transfer.
However, Chelsea's decision to extend his contract means they will now be able to recoup a fee for the former Arsenal striker should he push to leave in the next transfer window.
Chelsea director Marina Granovskaia said: "Olivier has been such a crucial part of so many big moments for this club, from his contribution to our FA Cup victory in 2018 to scoring 11 goals on the way to winning the Europa League in 2019.
"He has continued to score significant goals, and we will never forget his effort against Atletico Madrid on the way to winning the Champions League this season.
"With so much to still to play for, there was only one decision we could make when we exercised the option to extend his contract back in April."
The news of Giroud's deal came shortly after Chelsea announced defender Thiago Silva had committed to the club for a further year.
Fikayo Tomori, who was loaned to Milan last term, is expected to move to the Rossoneri on a permanent deal.