Former Caley Thistle midfielder Barry Robson scored twice in a the space of 10 minutes and further goals from Peter Pawlett and Niall McGinn gave Aberdeen a four-goal lead at the break.
Thistle striker Billy McKay repeated Robson's feat in the early stages of the second half and Aberdeen were holding on for victory after Graeme Shinnie's goal on 90 minutes.
Robson fired in the first of his goals from the penalty spot on 22 minutes after Josh Meekings was adjudged to have handled his cross in the box.
And the Dons doubled their advantage when Robson rose inside the six-yard box to beat Caley goalkeeper Dean Brill with a backward header from Pawlett's cross.
Pawlett (37) then got among the goals when he produced an assured finish from 12 yards from a Scott Vernon delivery.
A minute before the break a wonderful run by McGinn that started just inside the Caley Thistle half took the forward to the edge of the 18-yard box, where he unleashed a powerful drive that fizzed past the exposed Brill.
Inverness rallied two minutes after half-time when Dons keeper Jamie Langfield failed to deal with a Carl Tremarco corner and McKay turned the ball home from close range at the back post.
Langfield atoned for his error when he blocked a volley from Nick Ross, who then turned provider when he showed great tenacity to win the ball 20 yards out and find McKay (57), who kept his composure to round Langfield and drive a low shot beyond Michael Hector on the line.
The Dons brought on former Inverness winger Hayes but it was McGinn who almost made the game safe - only for his shot on target to be diverted away by Raven.
Ross Draper struck the upright with a header from Tremarco's corner, before Raven rattled the same post as he attempted to turn the rebound home from an acute angle.
Shinnie stole in at the back post to head home Draper's deep cross for the third, but Inverness where unable to pull of an amazing comeback by adding another in five minutes of stoppage time.