The 30-year-old has signed a two-year contract, and the Terriers have the option to extend it by 12 months.
Lees was released by the Owls in the summer after seven years at Hillsborough but will not feature against them in Sunday's League Cup tie.
His experience could be of huge importance to a side who in remodelling their defence this summer have released centre-backs Christopher Schindler, Richard Stearman, Richard Keogh and Tommy Elphick. Levi Colwill, who has come in on loan, is highly rated but the 18-year-old's only senior football has come playing for Chelsea's under-23s in the Football League Trophy.
“Tom is an experienced centre back, with many games in the competition under his belt," said coach Carlos Corberan "He adds to our knowledge of the division in our back line, which is always a good thing.
“We also know he is a really good character to add to our dressing room, and he is another important option ahead of the new league season.”
Nearly 400 of Lees's 500 career appearances have been in the Championship and since making his first appearance at that level in 2011, he has made at least 30 appearances a season across the second tier and cup competitions.