The 22-year-old defenseman was a restricted free agent and did not attend Maple Leafs training camp, which began Sept. 22.
Maple Leafs defensemen Jordie Benn (groin) and Carl Dahlstrom (shoulder) each was injured during the first period of a 3-0 preseason win against the Montreal Canadiens on Wednesday. Coach Sheldon Keefe said each player would have further testing Thursday but expects each to miss time.
Toronto also is without defenseman Timothy Liljegren, who had hernia surgery Sept. 16 and is expected to need six weeks to recover, and defenseman Jake Muzzin practiced for the first time during training camp Wednesday after being held out because of back discomfort.
"This morning, Rasmus Sandin and [agent] Lewis Gross reached out to us and informed us that after watching our game last night and seeing more injuries accrued by our defense that they wanted to get this locked in today so Rasmus could get over to Toronto and help his teammates," Maple Leafs general manager Kyle Dubas said.
"We appreciate Rasmus and his camp taking that step today to get this contract done and allow him the time to ready for the final preseason games. As stated throughout this process, Rasmus is a key member of the present and future of your team and we are excited today that he is en route to Toronto to ready for opening night in Montreal."
Sandin had 16 points (five goals, 11 assists) in 51 regular-season games last season. He did not play in Toronto's seven-game loss to the Tampa Bay Lightning in the first round of the Stanley Cup Playoffs.
"It's big for us," Maple Leafs defenseman Justin Holl said. "I think he brings a lot to the team and I played with him for a period of time so I got to see first-hand how good he is and how effective he is when he's playing at his best so I think it's great for us."
Selected by Toronto in the first round (No. 29) of the 2018 NHL Draft, Sandin has 28 points (six goals, 22 assists) in 88 regular-season games and one goal in five playoff games.
NHL.com independent correspondent Dave McCarthy contributed to this report