Garoppolo's deal, which was first reported by NBC Sports Bay Area and subsequently by the league's official website, is the biggest in NFL history on an average-per-year basis at $27.5m per season.
The 26-year-old quarterback was acquired in October from the New England Patriots for a 2018 second-round pick.
He was in the final year of his rookie deal and set to become a free agent ahead of next season, but now San Francisco's hopes of making him the team's next franchise quarterback have become a reality.