The pact is worth an MLB-record $43.3 million in average annual value. New York Yankees ace Gerrit Cole held the previous record at $36 million in average annual value.
Scherzer's deal also is expected to give the Mets the highest payroll in MLB next season.
Scherzer, 37, went a combined 15-3 with a 2.46 ERA last season in 30 appearances for the Washington Nationals and Los Angeles Dodgers. In July, the Nationals traded the eight-time All-Star, along with infielder Trea Turner, to the Dodgers.
Scherzer went 5-4 with a 3.74 ERA in 12 starts during MLB's COVID-19-shortened 2020 season. He owns a 190-97 record with a 3.16 ERA in 407 career appearances.
He ranks fifth all-time with 10.715 strikeouts per nine innings for his career. His 10,266 batters faced ranks fifth in MLB history.
Sherzer will join two-time Cy Young Award winner Jacob deGrom atop the Mets' starting rotation.