Curtis Main got the final touch to a soft early opener after Ross Callachan allowed Craig Tanner’s corner to go past his position at the near post.
But Kyle Lafferty levelled from the spot six minutes after the break - despite Steven Naismith being the designated penalty-taker - before hitting the post and forcing a brilliant save from Trevor Carson.
Motherwell struck a stunning winner through Carl McHugh but the Tynecastle boss felt his side were well worth a replay and argued that they should have had a second spot-kick after a late handball by Andy Rose.
“The first-half performance was terrible,” Levein said. “Although Motherwell didn’t have a lot of chances because we were stuffy, we were certainly as poor as I have seen us for a while in terms of possession of the ball.
“In the second, we controlled the game. I thought we had an unbelievable penalty claim for a clear handball, we have hit the post and Trevor Carson has made an unbelievable save from Kyle Lafferty’s header.
“I honestly did not see that coming. It was a real sucker punch.”
Levein explained what happened at the first goal.
“For some inexplicable reason, Ross thought the ball was going out of the park and let it go,” he said. “It is a difficult thing to understand but it was typical of our first-half performance.”