Donnarumma has been a regular in the Milan post since making his debut as a 16-year-old in the 2015/2016 season.
The 22-year-old Italian international has since made more than 250 appearances for the Rosonerri but has been unable to agree terms on an extension.
“He was a protagonist, a leader and often a captain," AC Milan’s technical director Paolo Maldini said of the goalkeeper during an interview on the club’s official Twitch channel.
"A professional must also be ready to change his shirt," Maldini continued. "It is increasingly difficult to start a career in one place and finish it there.
"We must thank those who gave so much for Milan and Gigio did it, without ever disrespecting the club. Our paths divide here and I can only wish him the best."
Milan have been linked with Lille’s title-winning goalkeeper Mike Maignan as a replacement for Donnarumma.
Donnarumma has also been linked with Juventus, Chelsea and Tottenham Hotspurs, who are all keen on securing one of Europe’s brightest shot stoppers on a free transfer.
Donnarumma has won 25 caps for the Italian national team and will likely be his country’s first choice between the sticks at this summer’s European Championship.