Former Stevenage star Boyd slotted Posh ahead two minutes after the interval in the early kick-off at London Road to provide a platform for victory in the teams’ first Football League meeting.
Boyd finished from close range after winger Dominic Green drilled a deep Russell Martin delivery back across the danger area.
And another Martin cross and Boyd lay-off led to Mackail-Smith – who had earlier been three times denied by Leeds goalkeeper Casper Ankergren – sealing the points in the final minute to end a six-match Leeds winning run.
Posh had a lucky escape nine minutes from time when Luciano Becchio saw a leveller wiped out for offside and things only got worse for the Yorkshire side when Mackail-Smith condemned them to a first away defeat.
It capped a miserable afternoon for Leeds, who lost first-choice goalkeeper David Lucas to a broken finger in the warm-up.