The 24-year-old was out of contract at Nottingham Forest and was said to be interesting a host of clubs.
Lynch, who played 39 games for Forest last season, was recently named on the bench for Wales' friendly clash with Mexico.
Town boss Simon Grayson believes the arrival of Lynch is a "real coup" for the Terriers and told the club's official website: "This is a fantastic deal for the club, because without going into too much detail around six to eight Championship and two Premier League clubs showed a very strong interest in Joel.
"We've had to be patient and we've worked very hard, but it's all worthwhile and we're delighted to have him here.
"The fact that he has chosen to come to us is evidence that people are really buying into what we're trying to do here; it's a real coup for Huddersfield Town."