Danny Gabbidon's second-half header proved the difference and earned Mark Hughes victory on his first match in charge at Loftus Road.
The Welsh defender's goal also helped the home side end a miserable FA Cup run, with Rangers 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.
Hughes named a strong line-up for the game and made just one change to the side defeated 1-0 at Newcastle, with Federico Macheda replacing Heidar Helguson in the starting XI.
MacDonald featured for MK Dons having missed the previous encounter with QPR due to a knee injury, while Mathias Doumbe was included in defence.
It was the Dons' first match since the ...