The team did not announce financial terms Tuesday. The 24-year-old Andersson was a restricted free agent.
Andersson played 38 games for the Red Wings in 2012-13, scoring three goals with five assists. The native of Munkedal, Sweden, also appeared in 14 postseason games.
He played in five regular-season games in 2011-12.