Pirlo, who turns 32 on Thursday, is expected to join Juventus.
He told reporters outside Milan's downtown offices on Wednesday that "after 10 unforgettable years, I want to thank the club and fans for all their affection."
Pirlo missed several months of action this season with a right knee injury but returned to help the club win its 18th Serie A title.
Defender Alessandro Nesta and forward Filippo Inzaghi renewed their contracts through June 30, 2012.
Defender Thiago Silva, extended his contract through June 2016 on Tuesday, and midfielder Mark van Bommel and No. 3 goalkeeper Flavio Roma extended their deals through next season.