Media playback is not supported on this device
The 28-year-old has agreed a three-year deal and will join the Pittodrie club ahead of next season.
The Dons failed with a bid for the same player 14 months ago.
"He is a player we have admired for a long time and he will be a very welcome addition to the squad here at Pittodrie," manager Derek McInnes told the Aberdeen website.
"He is a confident player, exactly the type of player we want to see at our club. There is more to come from Greg and I'm sure we will provide the perfect platform for him to develop."
The Pittodrie club are still in talks with captain and midfielder Ryan Jack and defender Ash Taylor, who are out of contract in the summer.
Forward Niall McGinn is also nearing the end of his deal, the Northern Ireland cap having scored 13 goals at club level this season.
Tansey, a scorer on seven occasions this season, follows left-back Graeme Shinnie and winger Jonny Hayes in joining Aberdeen from Inverness while Dons striker Adam Rooney also previously played for the Highlanders.
He is in his second spell with Caley Thistle and has also featured for Stockport County, Altrincham and Stevenage.
Aberdeen have signed the Inverness Caledonian Thistle midfielder Greg Tansey on a pre-contract.