The 34-year-old Aberdonian had been interesting other SPL clubs but was determined to play for the club he has always supported.
Rae, who has 14 Scotland caps, spent a season at Aberdeen junior side Hermes before starting his senior career at Dundee then being transferred to Rangers in 2004.
He spent three years with the Ibrox club before moving south to join Cardiff City.
After leaving the Championship side last summer, he was snapped up by Dundee for a second time.
Rae joins fellow former Rangers midfleider Stephen Hughes at Aberdeen, after the latter joined up at Pittodrie last week.
Rae is ineligible for Saturday's Scottish Cup tie with Queen of the South as he is cup-tied.