Scotland right back Stephen O’Donnell scored a deflected opener from distance in the final minute of extra time to put a below par Motherwell 1-0 up.
But Gus MacPherson’s Championship battlers Morton then equalised in the 120th minute through Markus Fjortoft, who headed home a corner, to take the game to a nerve shredding shootout.
Fortunately for the Steelmen, their spot kicks were infinitely better than their overall display during the 120 minutes.
Mark O’Hara, Devante Cole, Chris Long, Jake Hastie and O’Donnell all netted, with keeper Liam Kelly’s save from Morton’s third kick by Sean McGinty meaning ’Well prevailed 5-3 to book an away clash at Hibs this Saturday, KO 5pm.
’Well boss Graham Alexander said: “I’m happy, obviously relieved because it was a real tough night for us.
"We didn’t start the game well. I thought we were a little bit slow in our build-up. The way Morton set up made it so and we got maybe frustrated with each other.
"We could have done things better. I’d also like to acknowledge how well Morton played and made it difficult for us.
"When we score late on you think we’ve done it but we give a real sloppy setpiece away.
"But I’ve got to give credit to my players because throwing it away at that final second could have been soul destroying but we picked ourselves up, went into the penalties and took five great penalties and Liam's made another good save.”
One concern for ’Well was the sight of midfield dynamo Allan Campbell hobbling off with a thigh injury in extra time.
"I’ve just seen him there with a bag of ice on his leg,” Alexander said. “I think that’s the first time I’ve seen Allan Campbell not complete a game.
"He’s a tough boy, fit as anything. Fingers crossed he’ll be ok for the coming games because he's a brilliant player, massive player for us.
"He’s been brilliant in my time here.
"You fear the worst when someone like Allan Campbell comes off because you think he’s beyond human.
"But he probably showed that he is actually human tonight.”
After the exertions of Friday night, ’Well face a league derby at Hamilton Accies this Wednesday, KO 6pm, with the Steelmen keen to avoid incurring a fourth Premiership defeat out of four against their local rivals – who are bottom of the table – this season.
Alexander said: “The players work hard and they're a fit group of boys. We had to use that energy (against Morton).
"It wasn’t ideal going all the way to extra time and penalties but we’ve got a massive game on Wednesday against Hamilton which we have to recover for really quickly.
"But they’re good pros, they do things right and they’ll be ready to prepare for the game.
"Two hours of football, there’s a lot harder things out there to do. It’s what they’re trained to do, so they’ll be fine.”
Motherwell: Kelly, Lamie, McGinley, Campbell, Crawford, Long, Lawless, Maguire (Hastie 81), Gallagher, O’Donnell, Cole.
Morton: McAdams, Ledger, Fjortoft, McLean, McGinty, Jacobs, McGinn, Muirhead (Orsi 73), Nesbitt, McGuffie, Lyon (McGrattan 83).
Referee: Willie Collum