The team announced the deal after practice Friday afternoon, when Rodgers signed the paperwork. Terms were not disclosed.
"It means a lot,'' Rodgers said. "I'm very excited knowing that my future is going to be here in Green Bay.''
A former standout at California, Rodgers was the Packers' first-round pick in 2005. He then spent three years as the backup to Brett Favre.
His long-awaited opportunity to become Green Bay's starter came when Favre retired in March. Then Favre expressed a desire to return to football, making Rodgers future seem uncertain.
But when Favre finally came out of retirement after training camp started in early August, Packers management stood by its commitment to Rodgers and traded Favre, the NFL's only three-time MVP, to the New York Jets for a conditional draft pick.
"I appreciate the commitment that they've made, and I plan to reciprocate that commitment in my play and hopefully prove to them that they made the correct decision giving me this extension,'' Rodgers said Friday.
The 24-year-old has had a solid beginning as a pro starter.
In seven games, he has completed 65.6 percent of his passes for 1,668 yards and 12 touchdowns with only four interceptions. His passer rating is 98.8.
Rodgers has played the last three games with a sprained throwing shoulder, which he hurt in the Packers' 30-21 loss at Tampa Bay on Sept. 28.
"As we talked about in the past, we try to be proactive in our discussions with our current players, and we felt like this was an appropriate time to try to come to an agreement with Aaron,'' Packers general manager Ted Thompson said in a statement. "We feel like this is good for the organization and the players, and we will continue this approach as we move forward.''
Rodgers said contract talks with the Packers had been ongoing the last few weeks, and he acknowledged Friday he felt an urgency to perform well from the start of the season.
"I can't say that wasn't on my mind,'' Rodgers said. "Just to be able to play the way I did at the start of the season I think definitely helped. But this was still a little unexpected. So, I appreciate the commitment they've made to me.
"I still had a year and a half on my deal left, but this definitely means a lot to me that they're saying I'm going to be the guy. And not just for the next two years, I'm going to be the guy for the future.''