MacKenzie struck after substitute Hector Sam was hauled down when one-on-one by Silvio Spann who was consequently dismissed as the fourth official announced there would be four minutes of injury time.
From the resulting free-kick on the edge of the area the former Scunthorpe United man lashed home to give Notts a deserved winner after Spann had equalised Spencer Weir-Daley's opener.
After the match a fan quipped: "Isn't it great to see smiles at Meadow Lane again?" And it sure is, a deserved three points and an improved performance.
McParland made three changes to the side that lost his first game in charge at Mansfield Town last week, restoring Lee Canoville at right-back for Gary Silk, bringing Myles Weston in for Austin McCann and Matt Somner for Andy Parkinson.
Mayo moved to left-back while Richard Butcher took up an unusual role as a right midfielder.
With four defeats on the bounce Notts had slipped to 20th in the League Two table but faced a Wrexham side even lower - in 23rd.
A win was crucial and Notts did just about enough to merit the three points despite leaving it late.
The tempo was up from the start and it was Notts who were creating the early openings with everything going through the dominating MacKenzie.
Somner was the first to strike hitting an ambitious 25-yarder towards Anthony Williams' goal but it was always dipping off target.
Stephen Hunt then lashed over on the half-volley after a corner kindly fell to the Captain just inside the box.
But he found himself in trouble as Notts got a deserved opener on seventeen minutes.
Red Dragons defender Steve Evens weakly passed back to his goalkeeper and the lively Weir-Daley nipped in quickly before rounding Williams with ease and slotting into the empty net.
Every player except goalkeeper Kevin Pilkington rushed to the corner of the pitch to congratulate Weir-Daley on his first goal at Meadow Lane and second of the season - a clear show of unity after a difficult few weeks, and also something you didn't always see under Steve Thompson.
Weir-Daley and Weston had enjoyed particularly promising starts, both working their socks off and troubling the visitors' back five on several occasions.
Weston himself nearly got on the score sheet with a powerful strike soon after smashing a drive from 25 yards that Williams did well to tip wide.
The Magpies continued to produce easily the best footballing display of the season so far with MacKenzie switching the play and looking to introduce Weston - in his first Notts start after troublesome injuries - at every opportunity.
The struggling visitors then made their first inroads towards Kevin Pilkington's goal after 26 minutes as a Simon Spender cross is headed back across goal dangerously by Neil Roberts but Welsh international Chris Llewellyn narrowly fails to react.
A second Notts strike is now looking all the more likely with Somner again hitting a long-range effort off target and Weir-Daley going close with a neat turn and low effort.
Unfortunately the excellent Somner picks up a fifth booking of the season after a foul and that rules him out of next week's tricky trip to Accrington Stanley - a huge blow based on his tenacious showing today.
But it is Pilkington who makes sure Notts go into the break with their deserved advantage intact as he produces a superb one handed save from a point-blank Richard Hope header, somehow arching his back and tipping over his bar.
Notts leave the field to a rapturous ovation for their excellent display that saw plenty of heart and good football and a deserved advantage through Weir-Daley.
However the second half became a different story as Wrexham upped the tempo and Notts began to look a little nervy, with only to wins to their name so far and just two clean sheets.
Spann, introduced as a 28th minute substitute for the injured Mark Jones, began to make his mark with two or three decent efforts.
MacKenzie then battles his way through three or four challenges but weakly hit's a strike at goal that is comfortable for Williams.
Weston also broke clear but with Weir-Daley and Lawrie Dudfield well placed in the box the former Charlton Athletic youngster chose the wrong option by shooting rather than crossing and Williams gathered possession.
The game had developed into a rather scrappy and tense affair with neither side able to stamp any authority until Notts were rocked by a Spann equaliser with just twenty minutes to go.
The Trinidadian picked up a loose ball just outside on the right of the penalty box and drilled a thunderbolt at goal that took a deflection and whistled past Pilkington into the net.
The Welshmen were delirious while Notts looked deflated that they might not win a game that seemed comfortable theirs against a fairly poor Wrexham outfit.
A tiring Weston was replaced by Parkinson immediately to a deserved ovation.
Eifion Williams then headed wide before Notts hit back with another Somner effort that curled just wide.
Time was running out for McParland and his players and he shoved Sam on for Weir-Daley as the clock ticked in one last switch.
Immediately he gets into the game and after finding Dudfield he sees his strike partner hauled to the ground in the penalty box but the referee defiantly waves the claims away despite it seeming obvious to almost everyone else.
Then came the defining moment as four minutes of stoppage time was announced and Sam burst through one-on-one with his countryman Spann tracking him.
As Sam looked to dart into the box Spann clearly pulled him to the floor and was dismissed but the referee gave a free-kick rather than the penalty some thought it might have been.
Not to worry, up stepped man of the moment MacKenzie to delightfully curl home with a fine effort and the players again all joined in great celebrations.