"Milan is my home," the Brazilian, who joined the club in 2007 as an 18-year-old, told Milan's website.
"I don't want to interrupt my career with the black and reds after winning my first two trophies with this shirt," added Pato, who helped Milan win Serie A last season and the Italian Super Cup in August.
"I want to contribute to writing Milan's history and to the future success of this club with happiness and in perfect harmony with the environment.
"Today is a special day for me.
"I thank club president [Silvio] Berlusconi, the club and the supporters who have always believed in me."
Pato has not entirely lived up to his early promise, however.
He made a stunning professional debut with Internacional in Brazil, scoring within a minute and setting up two goals in a 4-1 win away to Palmeiras.
He played only a handful of games for Internacional before being snapped up by Milan.
He also scored on his Brazil debut against Sweden in 2008 but his form dropped off after that and, further hampered by injury, failed to make the 2010 World Cup squad.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.