Oduya will make an average of $3.75 million annually, sources told ESPN.com's Pierre LeBrun. The deal also includes a partial no-trade clause, sources told ESPN.com's Craig Custance.
The 33-year-old Oduya won two Stanley Cups with the Chicago Blackhawks since being acquired from the then-Atlanta Thrashers on Feb. 27, 2012.
"Johnny is a steady, veteran presence on the blue line, and he'll complement our group nicely," Stars general manager Jim Nill said. "He has achieved a great deal of success, winning the Stanley Cup twice, and his championship mentality will be valuable in our room."
The Swedish defenseman had the worst statistical season of his Chicago tenure in 2014-15 with only 10 points and a plus-5 rating in 76 regular-season games.
Oduya's ice time spiked in the 2015 playoffs to 24 minutes, 45 seconds, but his production remained flat.
During the Blackhawks' 2013 march to the Stanley Cup title, Oduya had a plus-12 rating and eight points in 23 games.
Oduya announced after the Blackhawks won the Stanley Cup that he played through a tear in his left elbow that he suffered in Game 3 of the series. His agent said Tuesday that he would not be returning to Chicago.
"I think from the start [re-signing with the Blackhawks] was something I was trying to do, and the organization obviously there was some will to try to make something work at some point," Oduya said on a conference call.
"As a player, you want to wait when there's somebody in the situation like that, that's willing to maybe look into a little bit more that there's an option for you to stay. And obviously with time as it progresses, other things become more interesting and maybe you start to obviously see yourself in a different spot."
The 2001 seventh-round draft pick finished a three-year, $10.12 million contract signed with the Blackhawks in the offseason following his trade to the team.
ESPN.com Blackhawks reporter Scott Powers contributed to this report.