The deal ties Kaepernick to the 49ers through the 2020 season and makes him one of the NFL's top 10-paid quarterbacks. He was scheduled to have made $1.073 million this season.
"Colin's hard work and dedication have played an integral role in the recent success of the 49ers organization," 49ers general manager Trent Baalke said in a statement. "His work ethic, leadership and on-field production have positively influenced our team, and we look forward to his continued growth in all areas."
The extension also is the ultimate sign of confidence that the 49ers have no worries about Kaepernick's role in an offseason incident in Miami that police still are investigating.
The 26-year-old Kaepernick is 21-8 as the 49ers' starting quarterback, including playoffs, and has thrown for 6,420 yards and 38 TDs in those games. His 507 rushing yards in the postseason ranks second to only former 49ers great Steve Young among all quarterbacks.
He has led San Francisco to three straight NFC Championship games, including Super Bowl XLVII.
He threw for 3,197 yards, rushed for 524 more and accounted for 25 TDs and only eight interceptions during the 2013 season.
Kaepernick's deal is expected to have strong implications on potential deals for Cam Newton, Andy Dalton and Alex Smith this year, along with Andrew Luck, Robert Griffin III and Russell Wilson next year, when they are eligible to sign their first NFL contract extensions.