The Welsh defender's goal also helped the home side end a miserable FA Cup run, having failed to win a tie in the previous 11 years.
However, QPR's victory could not disguise a desperate performance in which they were fortunate to overcome their League One opponents.
Charlie MacDonald and Jabo Ibehre looked dangerous throughout for the visitors, while on-loan Adam Smith and Stephen Gleeson also impressed.
But it was QPR who progressed by winning their first match in 11 attempts.
MacDonald featured for MK Dons having missed the previous encounter with QPR due to a knee injury, while Mathias Doumbe was included in defence.
This was the Dons' first match since the 1-1 draw in the original game, having seen Saturday's match with Carlisle postponed due to a frozen pitch.
QPR, by comparison, faced Newcastle just two days ago so it was no real surprise that the match was slow to get going.
Both sides looked content to play passing football and soak up pressure, with Luke Chadwick managing the first shot of the match after 11 minutes before moments later Jay Bothroyd blazed over.
The match continued to ebb and flow as the first-half wore on, although neither side were able to capitalise on patches of dominance.
Having seen an audacious 25-yard effort flash wide, Adam Smith delivered a superb right-wing cross that MacDonald almost directed goalwards.
Just as the visitors looked to be in the ascendancy, QPR broke and Shaun Wright-Phillips would have opened the scoring had it not been for a late Chadwick block.
Hughes' side continued to press and found the net in the 34th minute through a Shaun Derry header.
The midfielder managed to nod home Akos Buzsaky's corner in a congested penalty area, although the goal was ruled out after referee Phil Dowd adjudged him to have fouled goalkeeper David Martin.
Having come close to finding a way through, the Dons regained the impetus and had a clear-cut chance of their own.
MacDonald got behind the QPR backline after a looping ball from the back, but flicked wide when one-on-one with Paddy Kenny.
Chadwick was soon appealing for a penalty having felt bundled down in the box, before play returned to the other end.
Wright-Phillips beat the offside trap, but was unable to find a way past Martin, who deflected wide and then watched Buzsaky fire over as half-time approached.
The visitors started the second period brightly and, having seen an early Bothroyd effort go wide at the other end, Gleeson hit a bouncing effort straight at Kenny.
The Dons were impressing at the Premier League side's home ground, but were struggling to find an end product.
Adam Smith's ball was blocked in the six-yard box before it reached Ibehre, who moments later lost marker Luke Young and should have directed home another great ball from the right-back.
Gleeson saw a long-range rasping effort sneak just wide in the 61st minute, leading Hughes to change his ailing side.
Tommy Smith came on for the unimpressive Macheda, although it did not stop the QPR rot.
Dons defender Adam Smith almost netted from 20 yards after an inspired burst forward, before a snatched Chadwick effort flew over.
QPR were on the backfoot and only looked dangerous from set pieces, highlighted by a wonderfully-struck 30-yard Buzsaky free-kick that Martin did superbly to tip wide.
The Hungarian midfielder had looked one of the home side's most dangerous players and his substitution before the resulting corner led to a chorus of boos from the home fans.
Hughes' decision was not questioned for long, though, as Gabbidon immediately headed home Wright-Phillips' corner.
The visitors' heads seemed to drop after conceding and QPR looked good value for a second of the night.
The Dons pressed for a leveller late on but could not find a way through, much to the relief of the home support.