The 33-year-old went on trial with the Dons during their pre-season tour of Germany and did enough to impress manager Craig Brown, after he left Huddersfield at the end of last season.
Brown and Naysmith have linked up previously, with the defender picking up the majority of his 46 Scotland caps when Brown was the national coach.
Naysmith will be in contention to face defending SPL champions Celtic on Saturday for the opening game of the season.
The defender began his career in the capital with Hearts, before he earned a move to Everton in 2000 spending seven years at Goodison Park before he joined Sheffield United. In 2010, he moved to Huddersfield after three years at Bramall Lane.
Naysmith becomes the third signing this summer for Aberdeen, after the Pittodrie side signed Niall McGinn and Jonny Hayes from Celtic and Inverness Caley Thistle respectively.