Huddersfield Town manager Lee Clark told the club's website:"Gary has got real experience at the highest level. He still has desire and ambition."
Naysmith has also been capped 46 times by Scotland.
Clark added: "He's desperate to get to 50 caps and enter the Hall of Fame for Scottish footballers. He still has real hunger and desire, so I'm delighted. We have done very well to attract a player of Gary's calibre at this stage of his career.
"I hope this shows how ambitious the Club is and how determined we are to make progress. We're trying to do the right things."
Naysmith is the club's third summer signing following Scott Arfield and Joey Gudjonsson.
Source: BBC Sport
Source: BBC Sport