Toronto announced the deal Tuesday, a day after Martin took a physical.
He gets $7 million next year, $15 million in 2016 and $20 million in each of the final three seasons.
In 2014, the 31-year-old Martin had an offensive season reminiscent of those at the beginning of his career, batting .290 with 11 home runs and 67 RBIs for the Pittsburgh Pirates, while also setting a career best in on-base percentage (.402).
Martin, who was born in Toronto, also led the majors by throwing out 37 attempted base stealers and finished fourth overall with a caught-stealing percentage of 38.5 as he threw out 37 of the 59 baserunners attempting to steal with him behind the plate.
He was paid $8.5 million in 2014.
The Pirates made a one-year qualifying offer of $15.3 million to Martin for 2015, which he rejected, ensuring them draft-pick compensation. The Pirates traded for Yankees backup catcher Francisco Cervelli last week.
The Blue Jays used four catchers in 2014. Dioner Navarro, Josh Thole, Erik Kratz and George Kottaras (who had three at-bats as a Jay) combined to rank 11th among MLB catching contingents with a .659 OPS.
Navarro, who hit .274 and logged 2.1 wins above replacement in 139 games, will make $5 million in 2015 in the final season of a two-year, $8 million contract.
Blue Jays right-hander Marcus Stroman welcomed Martin to the team on Twitter.
The Blue Jays open their Grapefruit League schedule against the Pirates on March 3.
ESPN.com's Jerry Crasnick and The Associated Press contributed to this report.