Agents Jim Tanner and Roger Montgomery informed ESPN's Adrian Wojnarowski of the decision.
Lin, 30, is making $12.5 million in the final season of his contract. He's averaging 10.7 points and 3.5 assists in 51 games for the Hawks after coming over via an offseason trade from the Brooklyn Nets.
The Raptors will be Lin's eighth NBA team in nine NBA seasons. He has never stayed with an organization for more than two years and could be a short-term rental in Toronto. The Raptors will not have Lin's Bird rights when he hits unrestricted free agency this summer.
From a basketball standpoint, though, this is an ideal marriage that could put the Raptors over the top in the Eastern Conference and send Lin into free agency as a coveted asset. He will pick up ball-handling duties in second units behind Kyle Lowry, and the Lin/Fred VanVleet pairing should be fine. Both players have tended to work best with the ball in their hands, but they're each capable shooters who can knock down open threes.
The Raptors, one game behind the Milwaukee Bucks for the top spot in the East, also had room in their rotation after trading Jonas Valanciunas, Delon Wright and CJ Miles to Memphis for Marc Gasol before Thursday's deadline. Wright and Miles were averaging around 32 minutes per game combined off the bench, so Toronto needed to find a player or two to soak up those minutes. Lin has averaged 19.7 minutes this season, his second-lowest since his rookie year.
The degree to which Lin fits will determine his playoff minutes, given the shortening of rotations in May and June. Lin has played in just 17 postseason games in his career.