Barry Robson's penalty in the 22nd minute opened the floodgates for the Dons in the opening 45 minutes, with the midfielder later scoring a header before efforts by Peter Pawlett and Niall McGinn made it 4-0 to the visitors at the interval.
But Caley Thistle came storming back after the interval with Billy McKay scoring twice in the opening 11 minutes before Graeme Shinnie set up a grandstand finish as he reduced the deficit to one in the 89th minute.
However, it was not to be as Aberdeen held on to move up to third in the Scottish Premiership table.
For Dons manager McInnes, getting the win was all that mattered, despite a nervy second-half showing from his side.
He said: "I was delighted to get the three points. We came here with that objective.
"We managed to get ourselves 4-0 up at half-time, but we knew how dangerous Inverness would be if they got a goal early in the second half.
"I thought in the first half we were excellent. We showed that bit of quality and style, but the big thing for me was the energy of the players and putting the opposition under pressure.
"However, in the second half we opened the door for them and they nearly came right through."