Jacobs is the second former Giant to join the 49ers this offseason, following receiver Mario Manningham, who signed a two-year contract last week. The Giants beat the 49ers in the NFC Championship Game last season.
The Giants released Jacobs earlier this month rather than pay him a $500,000 roster bonus to go along with the $4.4 million he was due this season.
A fourth-round draft pick in 2005, Jacobs rushed for 56 touchdowns in his seven seasons with the Giants. He had 1,000-yard seasons in 2007 and 2008, but his carries and yardage dipped the past two seasons. He gained 823 yards in 2010, and had just 152 carries and a 3.8-yard average last season.
Jacobs, who turns 30 in July, had an up-and-down 2011 with the Giants.
Playing behind Ahmad Bradshaw, Jacobs rushed for only 571 yards in 2011, his lowest total since 2006, and was booed at times by New York fans.
In October, Jacobs told Men's Fitness magazine that he was unhappy with his role and that he didn't think he'd be back in 2012.
However, after the Giants' 21-17 win over the New England Patriots in Super Bowl XLVI, Jacobs said he wanted to remain in New York.
Information from ESPNNewYork.com's Ohm Youngmisuk and The Associated Press was used in this report.