A terrific second-half performance by Aberdeen helped secure their passage to the fifth round of the Scottish Cup.
Motherwell had the better of the first half but failed to score and Rory Fallon's venomous strike at the start of the second period proved pivotal.
Craig Brown's side scored a quick second - Joe Shaughnessy tapping in a Jonny Hayes cross.
'Well caused a nervy last few seconds when Michael Higdon scored a penalty, but Aberdeen deservedly progressed.
It meant that for the second consecutive season they knocked Motherwell out of the competition at Fir Park, with a trip to Easter Road to play Hibernian their reward.
They began the match as they had the original tie - on the offensive.
Josh Magennis almost capitalised on slack defending by Shaun Hutchinson, his shot taking a nick off a Motherwell player on its way wide.
And from the resultant corner Fallon guided a header goalwards, but Darren Randolph comfortably plucked it out of the air.
Motherwell responded swiftly, though, and a fine move on the slippery surface resulted in a Stuart Carswell drive at goal, which Langfield did well to repel.
It quickly became apparent that Motherwell were adapting better to the slick conditions and Higdon should have added to his 11-goal tally for the season before a quarter of an hour had been played.
Stuart McCall's side mounted a rapid counter-attack down the right, with Chris Humphrey whipping a cross onto the striker's head, but he directed it just too high to trouble Langfield.
Aberdeen were trying to play a 3-4-3 formation, but in practice the wide midfielders - Magennis and Shaughnessy - were operating as additional defenders as Motherwell pushed Jamie Murphy and Humphrey forward in support of Higdon and Henrik Ojamaa.
But the visitors provided a reminder of their own threat just before the half-hour as Hayes rifled in an audacious drive from 25 yards, which Randolph managed to push over.
And the keeper was called into action again three minutes before the break. Clark Robertson did superbly to pull a cross back from the bye-line. It was met firmly by the head of Fallon but Randolph managed to turn it away to safety.
He was utterly helpless to prevent Fallon opening the scoring six minutes after the break though.
Hayes powered down the left and when his cross was only half-cleared, the New Zealander lashed a shot from just inside the box into Randolph's top-left corner.
Motherwell were denied an immediate equaliser by a terrific intervention from Mark Reynolds, who somehow prevented Higdon tapping in Stevie Hammell's cross.
But Aberdeen really had the bit between their teeth and though Shaughnessy sent a close-range shot wide and Randolph saved well from Niall McGinn and Gavin Rae, the second goal came as no surprise on 61 minutes.
Hayes again provided the cross from the left and Shaughnessy stole in at the back post for an easy finish.
Motherwell had completely lost the fluency that had been so evident in the opening period. By contrast, Aberdeen were knocking the ball about confidently, with Hayes looking especially lively.
With Aberdeen looking comfortable, they conceded an injury-time penalty when Robertson handled, allowing Higdon to beat Langfield from the spot, but the home side could not force an equaliser.
Live Text Commentary
Full Time The final whistle goes and the game is over.90:00 +1:23 Goal scored
Goal! - Michael Higdon - Motherwell 1 - 2 Aberdeen Placed penalty scored by Michael Higdon. Motherwell 1-2 Aberdeen.90:00 +0:26
Clark Robertson handles the ball and concedes a .89:52
Free kick awarded for a foul by Rory Fallon on Stevie Hammell. Direct free kick taken by Darren Randolph.84:43 Substitution
Substitution Fraser Kerr replaces Tom Hateley.84:43
Robert McHugh has an effort at goal from deep inside the area missing to the left of the target.83:58
The referee blows for offside. Darren Randolph takes the indirect free kick.82:28
Free kick awarded for an unfair challenge on Johnny Hayes by Tom Hateley. Indirect free kick taken by Josh Magennis.79:13
Niall McGinn takes a shot from inside the box clearing the bar.78:34
Tom Hateley gives away a free kick for an unfair challenge on Johnny Hayes. Niall McGinn takes the free kick.78:01
Shaun Hutchinson takes a shot. Save made by Jamie Langfield.77:32
Chris Humphrey fouled by Josh Magennis, the ref awards a free kick. Tom Hateley takes the direct free kick.72:35 Substitution
Substitution Henrik Ojamaa goes off and Robert McHugh comes on.72:35 Substitution
Substitution (Motherwell) makes a substitution, with Zaine Francis-Angol coming on for Adam Cummins.70:58
Johnny Hayes has a drilled shot. Darren Randolph makes a comfortable save.66:20
Rory Fallon takes a shot. Save by Darren Randolph.64:35
Outswinging corner taken right-footed by Tom Hateley from the right by-line, clearance made by Rory Fallon.60:55
The assist for the goal came from Johnny Hayes.60:55 Goal scored
Goal! - Joe Shaughnessy - Motherwell 0 - 2 Aberdeen Goal scored by Joe Shaughnessy from close range low into the middle of the goal. Motherwell 0-2 Aberdeen.59:43
Niall McGinn has an effort at goal from close range which goes wide right of the target.
Effort from the edge of the box by Joe Shaughnessy goes wide of the left-hand post.57:52
Niall McGinn takes a shot. Save by Darren Randolph. Inswinging corner taken by Johnny Hayes from the right by-line, clearance by Shaun Hutchinson. Short corner worked by Johnny Hayes.56:51
Johnny Hayes takes a outswinging corner to the near post, clearance by Jamie Murphy.56:07
Inswinging corner taken left-footed by Stevie Hammell, Jamie Langfield makes a save.55:28
Foul by Niall McGinn on Henrik Ojamaa, free kick awarded. Stevie Hammell takes the free kick.54:23
Corner taken left-footed by Johnny Hayes to the near post, save made by Darren Randolph.53:45
Free kick awarded for an unfair challenge on Rory Fallon by Adam Cummins. Free kick taken by Andrew Considine.50:20
Joe Shaughnessy provided the assist for the goal.50:20 Goal scored
Goal! - Rory Fallon - Motherwell 0 - 1 Aberdeen Rory Fallon grabs a goal from inside the penalty area to the top right corner of the goal. Motherwell 0-1 Aberdeen.45:01
The referee gets the second half underway.45:00 +0:06 Half time
Half Time The players leave the pitch at half time.41:39
Rory Fallon takes a shot. Save by Darren Randolph.38:25
Mark Reynolds gives away a free kick for an unfair challenge on Michael Higdon. Direct free kick taken by Tom Hateley.32:21
Unfair challenge on Henrik Ojamaa by Andrew Considine results in a free kick. Free kick taken by Tom Hateley.31:56
The official flags Michael Higdon offside. Mark Reynolds takes the indirect free kick.31:17
Free kick awarded for a foul by Michael Higdon on Clark Robertson. Jamie Langfield takes the direct free kick.27:52
Shot from 30 yards from Johnny Hayes. Darren Randolph makes a save. Outswinging corner taken left-footed by Johnny Hayes, Foul by Rory Fallon on Adam Cummins, free kick awarded. Darren Randolph restarts play with the free kick.26:27
Corner from right by-line taken by Tom Hateley.26:09
Gavin Rae challenges Stewart Carswell unfairly and gives away a free kick. Direct free kick taken by Keith Lasley.25:22
Shot from outside the box by Jamie Murphy goes wide right of the target.19:57
Keith Lasley gives away a free kick for an unfair challenge on Johnny Hayes. Jamie Langfield restarts play with the free kick.19:22
Free kick awarded for an unfair challenge on Henrik Ojamaa by Mark Reynolds. Direct free kick taken by Tom Hateley.13:20
Centre by Chris Humphrey, Michael Higdon produces a header from deep inside the six-yard box that clears the bar.12:12
Free kick awarded for a foul by Shaun Hutchinson on Rory Fallon. Clark Robertson takes the direct free kick.8:48
Free kick awarded for a foul by Michael Higdon on Clark Robertson. Free kick taken by Jamie Langfield.8:17
The referee penalises Stewart Carswell for handball. Jamie Langfield takes the direct free kick.7:31
Chris Humphrey takes a shot.6:49
Free kick awarded for an unfair challenge on Michael Higdon by Andrew Considine. Adam Cummins takes the free kick.6:11
Michael Higdon produces a right-footed shot from just outside the penalty area that goes harmlessly over the target.5:34
Gavin Rae concedes a free kick for a foul on Stewart Carswell. Free kick taken by Darren Randolph.4:04
Corner taken by Stevie Hammell from the right by-line played to the near post, Rory Fallon manages to make a clearance.3:26
Free kick awarded for a foul by Josh Magennis on Jamie Murphy. Direct free kick taken by Stevie Hammell.1:22
Shot by Josh Magennis. Chris Humphrey gets a block in. Corner taken by Johnny Hayes played to the near post, Clark Robertson takes a shot. Save made by Darren Randolph.0:29
Free kick awarded for a foul by Josh Magennis on Chris Humphrey. Free kick taken by Shaun Hutchinson.0:00
The match gets underway.
Live data and text provided by our data suppliers