The contract is worth $12 million.
Marshall was released by the Jets last week upon his request and wanted to remain in New York. He serves as a weekly studio analyst for "Inside the NFL" on Showtime.
Releasing Marshall saves the Jets $7.5 million against the 2017 salary cap.
He said winning was also a high priority.
"I'm tired of watching the playoffs on my couch," Marshall said at the end of the regular season, which the Jets finished 5-11.
Marshall will be 33 on March 23 and enters his 13th NFL season, having played with the Broncos, Dolphins, Bears and Jets.
Stability at quarterback -- two-time Super Bowl MVP Eli Manning -- and another top-flight receiver (Odell Beckham Jr.) bolster the Giants' position to acquire other free agents, and the franchise is still shopping for a tight end.
That addition could come in the draft.
Marshall does count $1.875 million against the Jets' cap, the "dead money" on his deal.
He caught 109 passes for 1,502 yards and 14 touchdowns in 2015, when he posted 10 100-yard games. Marshall had 59 receptions for 788 yards and three touchdowns in 2016 after openly lobbying for quarterback Ryan Fitzpatrick to return as the starter.
The Jets are in rebuilding mode with no set answer at quarterback and parted with several other veteran leaders, including center Nick Mangold and cornerback Darrelle Revis.