The Dons thought this victory had put them on course for next season's Europa League only to have that place snatched from them as Kilmarnock claimed a later winner over Rangers, keeping the Pittodrie outfit in fourth place and leaving the hope of European football in the hands of others.
And deep into added on time goalkeeper Ofir Marciano prevented a third goal for Aberdeen as he saved Cosgrove's penalty, a little comfort at least for the home side.
McNutly enjoyed a string of early half-chances, a shot under pressure going wide, another straight at Dons goalkeeper Tomas Cerny and then a header off-target.
But he finally broke his goal drought which stretched back two months thanks to the vision of Fraser Murray, the youngster spotting his run before delivering a delightful little flick over the top for the striker to size up the situation before drilling the ball low past Cerny.
Former Hibs star Leigh Griffiths finally finds new club as striker set for foreign adventure
Edinburgh's Tynecastle Stadium: Here are 20 pictures from the 1950s and 1960s showing how much the Hearts ground has changed
Hearts confirm proposed kick-off times and alternative venue for Europa League play-offs
Lawrence Shankland reflects on partnership with Barrie McKay, missed chances and Martin Boyle stealing his thunder
Martin Boyle aims to see out rest of his career at Easter Road after stunning Hibs return
Two minutes later Murray himself almost made it two, the midfielder curling in a shot which had Cerny beaten but inches wide of the goalkeeper's left hand post.
Hibs had the upper hand but were ujnable to extend their advantage and paid the price two minutes before the interval, Connor McLennan firing in a low cross which eventually fell for Cosgrove to hammer in.
Murray had an opportunity to put Hibs ahead again 11 minutes into the second half as David Gray's cross found him alone and in space. But from just six yards out he could do no better than send a weak header into Cerny's arms.
Again Hibs paid the price, Dons substitute Stevie May touching the ball on for the unmarked Wilson to rifle the ball home.
The Dons looked as if they were heading for next season's Europa League at that point but Eamonn Brophy's late penalty earned Kilmarnock that place, leaving the men from Pittodrie to sweat on the outcome of next week's Scottish Cup final between Hearts and Celtic.
Hibs: Marciano, Gray, McGregor, Hanlon, Stevenson, Mallan, Milligan (Bartley 64), F Murray, Omeonga (Slivka 83), Horgan (Shaw 79), McNulty.
Substitutes not used: Bogdan, Whittaker, Agyepong, Kamberi,
Aberdeen: Cerny, Logan, Considine, McKenna, Lowe, Ferguson (Devlin 85), Ball (May 60), McLennan (Mackay-Steven 77), Shinnie, Wilson, Cosgrove.
Substitutes not used: Craddock, Gleeson, Campbell, Ross.
Referee: Euan Anderson.