The Irish striker coolly rolled home the spot-kick four minutes from time after Jeremy Helan was adjudged to have floored Richard Chaplow.
First-half goals from Owls pair Helan and Reda Johnson cancelled out Kamil Zayatte's early own goal to put the home side ahead.
The Lions should have been ahead inside two minutes when midfielder Chaplow arrived late in the box only to see his side-foot effort turned away by Wednesday goalkeeper Chris Kirkland.
But the visitors, who lined up in Wednesday's yellow away strip from last season after forgetting their kit, were not to be denied for long and duly made the breakthrough in the fifth minute.
Winger Lee Martin found space on the left-hand side to deliver a testing cross which Owls defender Zayatte could only divert into his own net from a couple of yards out.
The goal was Millwall's first in the league this season but the advantage did not last long as the hosts drew level two minutes later following a defensive mix-up.
Lewis Buxton's searching free-kick into the Lions' 18-yard area was spilled by former Wednesday goalkeeper Stephen Bywater and the resultant loose ball looped up for Owls full-back Johnson to head home from close range.
And the turnaround was completed just after the 20-minute mark when Austrian striker Atdhe Nuhiu doggedly won possession to tee up Frenchman Helan who found the bottom right-hand corner with a left-foot drive from 20 yards.
The home side could have been further ahead in the 27th minute when Michail Antonio burst past Millwall centre-half Danny Shittu before blazing over.
Wednesday again came close to doubling their advantage when towering forward Nuhiu headed against the left-hand upright on the stroke of half-time before Bywater denied Johnson's follow-up.
Both sides had penalty claims waved away by referee Stuart Atwell early in the second period and the match official was again at the centre of the action in the 58th minute when he denied full-back Johnson his second goal by awarding a free-kick for an adjudged infringement on keeper Bywater.
Millwall, who were back in their regulation kit for the second half, squandered the chance to level the contest in the 71st minute when the energetic Chaplow sent a free header wide from substitute Liam Feeney's right-wing centre.
Dave Jones' side looked to be heading for their first league win of the season but Keogh was to have the final say in the 86th minute as he sent Kirkland the wrong way from 12 yards after linesman Philip Dermott flagged for a foul following Chaplow's tumble.