The source said the deal includes $675,000 in performance bonuses.
MLB Network first reported on Shaw's agreement with the Blue Jays.
After two impressive seasons in which he surpassed 30 home runs for the Brewers, Shaw regressed in 2019. The infielder, who was demoted and spent almost a month at Triple-A San Antonio, slumped to a .157 batting average with seven home runs and 16 RBIs in 86 games last season.
Shaw, 29, played mostly at third base in Milwaukee but also saw action at first and second. He was non-tendered after the season as the Brewers parted with a number of key players after finishing behind the St. Louis Cardinals in a heated National League Central race and losing in the wild-card game to the eventual World Series champion Washington Nationals.
"I kind of wanted a fresh start and was willing to risk to see what was out there, free-agent-wise," Shaw told Boston's WEEI after the season, explaining that he was made an offer by the Brewers but declined.
After he was acquired in a multiplayer deal with the Boston Red Sox, Shaw immediately made his impact felt with the Brewers, averaging 4.0 wins above replacement over the next two seasons. He batted .273 with 31 home runs and 101 RBIs in 2017 and followed that with a .241-32-86 line in 2018.
For his career, Shaw is hitting .244 with 99 home runs and 310 RBIs in five major league seasons.
Information from ESPN's Jeff Passan was used in this report.