Mahoney was a constant thorn in the Hatters' side and capped off a fine performance with a game-sealing strike, firing across Simon Sluga to make it 2-0 in the closing stages.
Luton pushed in the second half but lacked a cutting edge, with their second successive defeat seeing the Lions leapfrog them into the play-off places.
Early possession went Luton's way but opportunities fell to the hosts, Mason Bennett slotting through Ryan Leonard who could only fire wide of the far post.
Bennett continued to threaten, his hanging cross headed over by Jake Cooper as Millwall upped the momentum through the first half.
They should have scored when Smith's back-post header cannoned into the upright, with Jed Wallace's follow-up well saved by Sluga.
Mahoney posed problems down the left but he showed plenty of enterprise cutting in as well, with his long-range strike forcing another low stop from Sluga.
But a barrage of corners finally saw the Lions take the lead, Mahoney's excellent delivery met by Smith and going in courtesy of a crucial deflection off Cranie, with the last attack of the half.
Wallace should have doubled the lead five minutes after the break but somehow blazed over the bar with the goal at his mercy.
Luton finally found some attacking impetus and they felt aggrieved not to have a penalty when Danny Hylton was seemingly pushed in the area.
Substitute Joe Morrell then fizzed wide just moments after coming on but Millwall still held a threat at the other end, with the game opening up towards the final quarter.
LuaLua was off target shortly after but the Hatters were limited to long-range shots as a solid home defence held firm.
And the visitors were duly punished with a second Millwall goal, Ruddock giving the ball away with the resulting attacking move finding Mahoney who fired across the goal and beat Sluga to score off the inside of the post.
It took until the 83rd minute for a first major Town chance, with Bartosz Bialkowski producing a wonderful fingertip save to deny Cranie.
Ruddock headed wide in stoppage time but no goals looked likely for a Luton side who have now scored in only one of their last four Championship games.