McLeod's deflected effort five minutes from time and Clive Platt's simple finish spared team-mate Ben Chorley's blushes after his own goal looked set to hand Wednesday the points.
The Owls, who extended their unbeaten run to nine matches, were gifted the opening goal in the 11th minute when James Quinn capitalised on an error by Dons keeper David Martin to fire home his first for the club.
The new signing from Willem II dispossessed the young stopper as he tried to cheekily turn inside him after collecting a back pass, and scored from a tight angle despite the best efforts of Michel Pensee-Bilong to keep it out.
Wednesday raised their game after the goal and Joey O'Brien was unlucky not to double the lead in the 23rd minute when Martin made amends for his earlier error by denying the on-loan Bolton man superbly from seven yards.
And just moments before the break Martin was in fine form once again, acrobatically turning Jon-Paul McGovern's fierce strike from the edge of the box round the post after a neat piece of skill.
Platt equalised for the Dons in the 58th minute, sliding the ball into an empty net after Wednesday keeper David Lucus' poor punch.
The Owls went back in front just three minutes later when Chorley inadvertently diverted Adam Green's dangerous cross into his own net.
But McLeod had the last word for the relegation strugglers in the 85th minute, firing home from a tight angle to preserve their six-match unbeaten home league run.
Dons boss Danny Wilson said: "I brought Izale on to run at their full-back and he's done that and scored a cracking goal."
Wednesday manager Paul Sturrock said: "We got exactly what we deserved.
"We dropped three gears at the start of the second half."