Louis Moult's double sent Motherwell into the Betfred Cup final as Rangers boss Pedro Caixinha and opposite number Stephen Robinson were sent to the stand during a bad-tempered semi-final.
Moult scrambled home from a 52nd-minute corner and produced a stunning first-time lob to seal a 2-0 victory and a return trip to Hampden to face Celtic on November 26.
Both managers were ordered off by referee Steven McLean after clashing on the touchline after the already-booked Motherwell striker Ryan Bowman caught Fabio Cardoso with an elbow in an incident which went unpunished by the referee.
Robinson spent his time in the stand relaying messages to assistant Keith Lasley while Caixinha must have been contemplating what the future holds after declaring in midweek that his team had only two options - to "win or win".
But Motherwell already had 18 goals in the competition as well as winning six of their previous eight games and Caixinha is still searching for a third consecutive win as Rangers boss. His decision to omit Kenny Miller again looked questionable as Rangers toiled in front of goal.
Both sides went direct in the opening quarter and Rangers had more joy, but Dean Windass hurried a weak shot straight at Trevor Carson and Alfredo Morelos shot wide from 16 yards.
There was an aggression from the off. Bowman was booked for catching Cardoso with his arm before Morelos remonstrated with Robinson after going down theatrically following a clash with Peter Hartley. Charles Dunne got away with a knee-high tackle which stopped Morelos racing through and Hartley was booked for going right through the back of the striker moments after being barged off the park by the Colombian.
Moult picked himself up off the deck after being floored by Cardoso's flailing arm before curling a 25-yard effort just wide off the Portuguese defender. Motherwell threatened from Chris Cadden's corner but Ryan Jack blocked Cedric Kipre's effort on the line.
Rangers left-back Declan John headed wide from a good chance on the break and his side created several opportunities early in the second half, but again Windass shot straight at Carson and Motherwell soon went ahead. Cadden delivered a corner into the goalmouth and Hartley and Moult saw headers stopped by the bar and Jack before the striker lashed the ball into the roof of the net.
Rangers were forced into a substitution after Bowman's elbow burst Cardoso's nose open with Ross McCrorie coming on as Caixinha and Robinson made their way into the stand.
Rangers tried to force their way back in but Daniel Candeias sent a couple of wild shots well off target and Moult showed him how it was done in the 74th minute. Dunne's ball down the left flank took out McCrorie and Moult let it bounce before lobbing Rangers goalkeeper Jak Alnwick from 25 yards.
Bowman almost rubbed salt in the wounds when he made space to shoot but was off-target and Carson effectively sealed the victory with a brilliant save to hold a Morelos header.
Bruno Alves was also lucky to stay on the park after kicking Moult on the ground before Motherwell fans hailed their first ever semi-final win over Rangers.