Gustafsson was released by the New York Islanders on Sunday. The deal with Chicago is worth $800,000.
The return of Gustafsson bolsters the Blackhawks' blue line after they lost young defensemen Caleb Jones and Wyatt Kalynuk to injuries. Jones sprained his left wrist, and Kalynuk sprained his right ankle.
The Blackhawks visit Colorado on Wednesday for their season opener.
The 29-year-old Gustafsson made his NHL debut with Chicago in 2015. He set career highs with 17 goals and 43 assists in 79 games for the Blackhawks during the 2018-19 season.
He was traded to Calgary in February 2020 for a third-round draft pick. He played for Philadelphia and Montreal last season, finishing with a goal and 11 assists in 29 games.
Gustafsson has 29 goals and 102 assists in 250 career regular-season games, to go along with a goal and seven assists in 31 playoff appearances.