The move was announced by the 49ers on Thursday, five days after Manningham's agent said terms had been agreed by the two parties.
"We are very pleased to add a player like Mario to our team," 49ers general manager Trent Baalke said in a statement.
"Although it is still early in his NFL career, he is a productive wide receiver with a lot of big game experience. He will be a nice compliment to our current wide receiver group and a good fit for our offensive system."
Manningham, who had also considered a move to the St. Louis Rams, said on a conference call: "They (the 49ers) have a great defense and I know I can come in there and make plays. I know I can make an impact there."
Asked why he had settled on the 49ers, he replied: "Knowing that they have good coaches there with good players around them and I know what they are capable of doing."
A third-round draft pick by the Giants in 2008, Manningham has recorded 160 receptions for 2,315 yards and 18 touchdowns in 49 games.
Last season, he had 39 catches for 523 yards and four touchdowns in 12 regular season games before adding 13 receptions for 189 yards and three touchdowns in the playoffs.
With the season on the line, the 25-year-old Manningham grabbed the headlines during the Giants' 21-17 Super Bowl win over the New England Patriots in Indianopolis on Feb. 5.
Trailing the Patriots 17-15, Giants quarterback Eli Manning lofted a pass down the left sideline that Manningham brilliantly corralled, tip-toeing inside the sideline for a 38-yard gain.
Manning connected with Manningham again before Ahmad Bradshaw darted through the middle for the go-ahead score with 57 seconds to play in New York's win.