Originally projected to miss four to eight months recovering from the injury, Williams made it back into Philadelphia's line-up in just three months. On January 20, 2004, Williams was traded to the Carolina Hurricanes in exchange for defenceman Danny Markov. During the 2004–05 NHL lockout, he went overseas to play for Luleå HF of the Swedish Elitserien, where he recorded 14 goals and 18 assists in 49 games. Williams signed a one-year contract with the Hurricanes for the 2005–06 season, when he set career-highs in games played (82), goals (31), assists (45), points (76) and penalty minutes (60). In the 2006 Eastern Conference Quarterfinals, Williams injured Montreal Canadiens captain Saku Koivu in the eye without being penalized in Game 3. Williams scored the final goal of the 2006 Stanley Cup Finals, an empty net goal at 18:59 of the third period of Game 7. With the score 2–1, a loose puck along the boards ended up on the stick of Bret Hedican, who passed it to Eric Staal. Seeing Williams open, Staal threw the puck down the ice to him. Williams skated down the ice and tapped the puck into the open net, sealing the Hurricanes' first Stanley Cup in franchise history. The Hurricanes won the series 4–3. On July 1, 2006, Williams signed a new five-year contract with the Hurricanes worth $3.5 million per season. In 2006–07, Williams recorded career-highs in goals (33), penalty minutes (73), power play goals (12) and game-winning goals (8). It was Williams' second consecutive season of 82 games played. Williams made his first appearance in an NHL All-Star game at the 2007 NHL All-Star Game in Dallas, recording a goal and an assist. Williams also played for Canada in the 2007 IIHF World Championship, in which he won his second gold medal. Williams was off to a good start for his 2007–08 season, with 30 points in 36 games (9 goals, 21 assists), before his season ended: on December 20, 2007, during the first period of a game with the Florida Panthers, Williams suffered a torn ACL and MCL in his left knee after a hit by Rostislav Olesz. Williams underwent successful surgery for the torn ligaments on December 26, 2007, and returned on April 1, 2008, only to leave the game with an unrelated back injury. On September 17, 2008, Williams was thought to be sidelined for four-to-six months when he tore his right Achilles tendon in an off-ice, pre-season workout.