Having started like a train, the Dons were derailed by a fierce Motherwell fightback late in the first half as this season's Scottish Cup run ended in the pouring rain of Fir Park.
There were two changes for the Dons for the Scottish Cup trip to Fir Park, Calvin Ramsay and Dylan McGeouch starting from the bench as Funso Ojo and Adam Montgomery came into the side that were narrowly beaten by Celtic on Wednesday. Goalkeepers Craig Samson and Jamie Shingler were named on the Aberdeen bench for the first time.
Motherwell made four changes after beating beaten at Dundee United in midweek. In came Jake Carroll, Mark O'Hara, Kevin Van Veen and Connor Shields with Callum Slattery, Kaiyne Woolery, Jordan Roberts and Nathan McGinley all out of the starting XI.
The teams were greeted by teeming rain and a howling wind at Fir Park, proper cup tie weather. But never mind the rain, the sun was shining on the Dons three minutes in as they snatched the lead. Vicente Besuijen collected the ball down the right and fed Ross McCrorie on the overlap. His first time cross picked out Christian Ramirez, all alone at the back post and he hammered a header into the roof of the net.
Another dangerous ball from McCrorie, this time from halfway as Motherwell cleared an Aberdeen corner, caused mayhem again, Lewis Ferguson only just losing out to Kelly as he chased after it.
Ramirez was inches away from a second on seven minutes, bullying Ojala out of the way as he ran after David Bates' long ball forward, before stretching to lob the ball over Kelly. It looked in all the way before drifting agonisingly wide on the wind.
Motherwell had a first real opportunity on 16 minutes, Van Veen taking a pot at goal from a free-kick 25 yards out, McCrorie getting up in the wall to block it wide. From the corner, the ball dropped nicely for Shields but his header arced wide.
Although the rain had eased slightly by midway through the first half, the conditions were becoming increasingly difficult, the ball beginning to stick on the sodden turf in some areas of the pitch.
Jonny Hayes went into the book on 32 minutes, sliding into Mugabi and from the resulting free-kick out on their right, the hosts should have levelled it up. Goss' teasing ball into the six yard box was a teaser, Solholm getting in front of everyone to get to the ball first, only to sky it over the bar from a couple of yards out.
Motherwell were level moments later though, Van Veen coming inside to shoot, the ball taking a thick deflection off Bates to loop into the far corner. In the aftermath, Van Veen got into the face of Declan Gallagher before being dragged away by his colleagues, Gallagher being cautioned, Van Veen getting away with it. There were more problems for the Dons when McCrorie had to limp off on 38 minutes with a nasty looking injury to the right knee, Ramsay replacing him.
Motherwell were imposing themselves physically on the game and were in the ascendancy now, Goss firing into the side netting from a dozen yards out on 40 minutes, Gary Woods having it covered all the way.
As the half headed into added time, Motherwell won a right wing corner. With virtually the last touch of the half, Shields put the Steelmen in front. Woods couldn't get in front of Shields, didn't get off the ground, and could only flap the ball down to Mugabi on the edge of the six yard box. His shot was partially blocked but it broke free for Shields to drive over the line past several Aberdeen men, from about three feet out.
HALF-TIME: MOTHERWELL 2 ABERDEEN 1
Jack MacKenzie replaced Hayes at the break as Aberdeen looked to rectify matters in the second half, the game restarting in bright sunshine.
Besuijen very nearly got in behind on 47 minutes chasing down a Scott Brown ball forward, but Kelly was off his line to snatch the ball away from him on the edge of the box.
Woods kept the Dons in the game a minute later, Van Veen through on goal, Woods throwing himself to his right to make a terrific save. Moments later though, as another cross came in, Woods fumbled the ball, Brown eventually able to hack the ball away. Matty Kennedy was the next change, replacing Montgomery on 52 minutes as Aberdeen desperately tried to turn the tide.
Ramirez gave Aberdeen a glimmer of hope on 62 minutes, but his first touch from Ojo's pass was just a fraction too heavy, Kelly smartly off his line to smother. At the other end, Efford tried his luck from the edge of the box but his shot was always rising over the bar.
A Dons corner on 67 gave some hope, Ramsay's ball reaching Ramirez beyond the back post, but he got his angles wrong and he slashed his shot wide of the near post. Like a basketball game now, Motherwell were next to try their luck, O'Hara's 25 yarder getting a deflection off Bates to take it just over the bar. Brown was fractionally late on Goss on 69 minutes and found his name being filled in on the referee's questionnaire.
Aberdeen got out of jail on 77 minutes, Van Veen clean through on goal after seizing on a misplaced header from Bates, but with just Woods to beat, he shaped his effort wide of goal.
A slew of changes followed, Connor Barron and Jay Emmanuel-Thomas replacing Ojo and Besuijen, Motherwell bringing on Lamie and Shaw for Shields and Goss, all on 78 minutes.
Van Veen was on the run again with eight minutes to go, but Woods stood up to him at the near post to put the ball behind for a corner. As Aberdeen cleared the ball, Barron was taken out by Carroll who collected a caution. Motherwell replaced Efford with Cornelius on 84 as the rain poured down again, threatening to wash away Aberdeen's Scottish Cup hopes again.
Aberdeen were pressing now, asking a few questions, Brown's backheel finding Ferguson 20 yards out but his low drive scuttled through a yard wide of goal on 87 minutes.
A Dons corner on 91 was half cleared to Barron 25 yards out and he shaped a shot through the box but only into the side netting as the seconds were ebbing away for Aberdeen. They kept Motherwell penned in and a MacKenzie cross won a corner with 30 seconds to go. A bout of head tennis, including Woods ensued, the ball finally finding Ramirez on the left. His shot looked bound for the bottom corner of the net until Kelly threw himself across the goal to make a fine save.
With that, the Scottish Cup was over for another season. In truth, a deserved win for Motherwell in the end.