During a low key opening Morecambe had a glorious chance to go in front when Garry Hunter's floated pass set Danny Carlton away in the inside left channel.
From eight yards out he should have made Woking keeper Shwan Jalal work but he skewed his left-foot shot wide of the upright.
The action was sparse as the half wore on with Woking struggling to make any impact going forward. Woking had just one effort at goal in the opening 45 minutes, a left-footed curler from MacDonald at a dead ball situation which flew a couple of yards wide.
Morecambe were neat and tidy in patches and might have scored on two occasions in the final minutes of the half. Michael Twiss burst past Karim El-Selahi before firing in an effort which Jalal did well to save.
Moments later a whipped cross from Gary Thompson provided an invitation to Carlton to get on the end of it, but he failed to connect.
The game need a goal and Morecambe's Craig Stanley would have provided it had he not fluffed his line from six yards after Michael Howard's cross had found him unmarked.
Woking boss Glenn Cockerill brought off midfielder Neil Smith and replaced him with Sole to give his side more of an attacking threat and an injury to Ferguson forced Cockerill's hand soon after, with non-contract player Goma Lambu replacing him.
Then came that dramatic finale as MacDonald's mistake took the shine off Sole's day, McNiven thumping home left-footed after MacDonald inexplicably presented him with the ball.