Aberdeen striker Scott Vernon came on as a late substitute to score the winner and inflict a first defeat of the season on Inverness.
Caley Thistle goalkeeper Dean Brill twice denied the Dons in the first half, diverting goal-bound efforts from Cammy Smith and Michael Hector.
Smith later reacted sharply to clear Josh Meekings' header off the line.
But Vernon's first goal of the season gave the Dons a first home victory over Inverness since 2011.
Terry Butcher's side remain top of the Premiership on goal difference, three points ahead of Aberdeen in third.
Vernon's brilliant volley on the turn, after skilfully chesting the ball, followed an Aberdeen free-kick which had been put into the Inverness penalty box.
It will boost the English forward's confidence and, in the absence of their usual talisman Niall McGinn, encourage a Dons team that has failed to score in four of their eight games this season.
It took Inverness 18 meetings with Aberdeen to record their first victory over the Dons in 2008, but in recent times the tables have turned.
Butcher's men defeated the Pittodrie side on the last two occasions so it never looked too promising that it would be against the Highlanders that Aberdeen would get their first home league win since the opening day of the season.
However, Derek McInnes's charges might have taken a first-half lead had it not been for an inspired performance by Brill.
Much has been said in the past week about Butcher's desire to extend the stay of the on-loan Luton Town man at Inverness, who nearly got his fifth clean-sheet of the season here.
He dived low to his left to beat away Smith's powerful drive, denying the 17-year-old a second senior goal - his first was against Caley Thistle last season.
Englishman Brill showed strong wrists again when Aberdeen's own loanee, Reading's Hector, rose to firmly meet a Jonny Hayes delivery at the back-post. The bulleted effort was goal-bound until Brill diverted it over for a corner.
Inverness failed to fashion many chances in what was generally a poor game to watch for spectators, but Aberdeen's Smith did crucially clear off his line when Graeme Shinnie's delivery was met by the head of Meekings.
The Inverness players claim it crossed the line but no goal was given, and it was left to Vernon to replace Smith and subsequently fire the winner.