The former Middlesbrough striker opened his Lions account shortly before half-time with a deflected effort from outside the area.
McDonald's strike means Millwall, who looked a club in crisis after propping up the table with no wins from their first six matches of the season, have now leapfrogged their neighbours in the standings.
It was a far cry from this time last week, when disgruntled home fans were calling for Lomas' head after a 5-1 capitulation against Derby.
Instead they made the short trip across south London buoyed by their first win of the season against Blackpool in midweek.
But Charlton made the brighter start and skipper Johnnie Jackson fizzed a 20-yard drive narrowly over the crossbar.
Millwall soon got into their stride, though, and Ben Hamer got down well to keep out long-range efforts from Martyn Waghorn and former Charlton midfielder Nicky Bailey.
And the Lions made the breakthrough in the 38th minute, with the aid of a wicked deflection off Dorian Dervite.
Hamer was already diving to his right to keep out McDonald's speculative 25-yard drive when it flicked off defender Dervite and rolled inside the keeper's left-hand post.
Charlton could have equalised 30 seconds into the second half when Dale Stephens collected the ball on the edge of the area but the midfielder could not keep his shot down.
But the Addicks, without their top scorer Yann Kermorgant through injury and with 19-year-old striker Joe Pigott making his full league debut, rarely looked like pulling level.
Simon Church had their best chance 14 minutes from the end when he was put through by sub Marvin Sordell.
The striker shaped to curl the ball round David Forde but the Lions keeper read his intentions too easily and made the save low to his left.
At the other end Millwall sub Steve Morison could have grabbed his second goal in two games but his shot was beaten away by Hamer, with Waghorn unable to get on the end of the rebound, and Scott Malone fired an angled drive into the side-netting.
However, one goal was enough to send the Millwall fans home happy while those of a Charlton persuasion were left voicing their discontent.