Stuart was drafted in the first round, third overall, in the 1998 NHL Entry Draft by the San Jose Sharks. In a game against the Los Angeles Kings on April 4, 2004, Stuart scored twice in a 17-second span, forcing the game into overtime at a 3–3 tie; Stuart's feat is the fastest that a Sharks player has scored two goals. The Sharks went on to win 4–3. In November 2005, after playing with the Sharks for more than five seasons, Stuart was traded to the Boston Bruins in exchange for Joe Thornton.
On February 26, 2008, the Kings traded Stuart to the Detroit Red Wings in exchange for second- and fourth-round picks in the 2008 and 2009 NHL Entry Drafts, respectively. On June 4, 2008, Stuart won the Stanley Cup as a member of the Red Wings, where he saw time as a top-four defenceman paired with Niklas Kronwall. On July 1, 2008, as an unrestricted free agent, Stuart re-signed with the Red Wings on a four-year, $15 million contract. Stuart returned to his hometown of Rocky Mountain House on August 17, 2008, with the Stanley Cup to share his celebration with those that supported him. Stuart played in 67 games during the 2008–09 season, recording 2 goals and 13 assists as the Red Wings came within one game of repeating as Stanley Cup champions, losing in the 2009 Stanley Cup Final to the Pittsburgh Penguins. He would record 61 points in the next three seasons with the Red Wings.
Return to San Jose
On June 10, 2012, Stuart's negotiating rights were traded to the San Jose Sharks in exchange for the negotiating rights to forward Andrew Murray and a conditional seventh-round pick in the 2014 NHL Entry Draft. Eight days later, it was reported Stuart signed a three-year, $10.8 million deal with the Sharks. On October 8, 2013, in a game against the New York Rangers, Stuart landed a hit onRick Nash which led to Stuart being suspended for three games. Stuart finished the season with 11 points in 61 games before surrendering a three-games-to-none series lead in the Conference Quarterfinals to the Los Angeles Kings.
On July 1, 2014, with the Sharks intent on getting younger, Stuart accepted a trade to provide a veteran presence to the Colorado Avalanche in exchange for second- and sixth-round picks in the 2016 and 2017 NHL Entry Drafts, respectively. On September 29, 2014, before playing a game with the Avalanche, Stuart signed a two-year contract extension with the organization. Stuart played in his 1,000th career game on December 18, 2014. Stuart finished the regular season with 3 goals and 10 assists for 13 points in 65 games as the Avalanche failed to qualify for the 2015 playoffs. In the 2015–16 season, his second season with the Avalanche, Stuart appeared in only six games before he was ruled out with a back injury on November 10, 2015. With little sign of improvement, on February 1, 2016, it was announced Stuart's season was over after he underwent back surgery. During the subsequent off-season on June 27, 2016, with the Avalanche aiming to go younger on defence, Stuart was bought out from the remaining year of his contract, ending his tenure with Colorado.