© PA Photos
Ross McCormack had missed a spot kick early on but Warnock made no mistake to make a persistent Leeds approach count in the closing stages.
Millwall started brightly at Elland Road and went close through Martyn Woolford in the early stages.
James Henry struck the post soon after as the visitors gave Leeds a scare in the first 15 minutes.
Leeds responded soon after and went close through Luke Varney and David Norris.
McCormack stepped up but could only send a tame penalty into the path of Lions keeper David Forde.
United continued to press but McCormack miscued once more from close range to keep the Championship rivals level at the break.
Michael Tonge twice went close on the hour mark for Leeds as frustration grew among the home crowd.
20 minutes from time Leeds were handed a second penalty after McCormack was brought down by an outstretched leg in the area.
© PA Photos
McCormack elected to pass penalty duty to Warnock, who put enough power behind his effort to beat Forde and score the winning goal.
Millwall had a late penalty appeal of their own turned down after Byram appeared to handle in the area, but the referee waved away protests as Leeds held firm to claim all three points.