Boldin wrote on his Twitter page that "I wanted to be the first to tell you that I'm returning to San Francisco. Looking forward to joining my teammates, coaching staff and fans to bring back another championship to the Bay Area. Let's go after our Quest For Six." The post was accompanied by a photo of him running through the tunnel at Candlestick Park in a 49ers jersey.
Boldin, who was set to become a free agent next week, led San Francisco with 85 catches for 1,179 yards to go with seven touchdowns last season. He was traded from Baltimore to the 49ers in the offseason for a sixth-round pick after helping the Ravens win the Super Bowl.
While the salary-cap strapped Ravens failed to make the playoffs, the 49ers went 12-4 during the regular season in part because Boldin filled the void created by an offseason torn right Achilles tendon that sidelined Michael Crabtree for the first 11 games. Boldin's performances earned him the Bill Walsh Award, given to the team MVP.
Boldin's return is not all that surprising. Coach Jim Harbaugh said at last week's NFL Scouting Combine that the franchise was determined to re-sign the wide receiver, and Boldin has repeatedly said he wanted to come back to the 49ers.
The move shores up one of San Francisco's top offseason priorities. Safety Donte Whitner and kicker Phil Dawson, who are scheduled to become free agents next week, are the others.
Boldin's transition from John Harbaugh's Ravens to Jim Harbaugh's 49ers seemed seamless.
Boldin, now 33 years old, was at his best in his debut for San Francisco when he caught 13 passes for 208 yards and a touchdown in a 34-28 win over Green Bay. He then capped his season with his second-best game with nine catches for 149 yards and a score in a Week 17 win over Arizona that clinched the fifth seed for San Francisco, which lost in the NFC title game to the eventual Super Bowl champion Seattle Seahawks.
Arizona drafted Boldin in the second round out of Florida State in 2003. He played seven seasons for the Cardinals and three for the Ravens.
AP Sports Writer Janie McCauley contributed to this story.