Faris Haroun netted after nine minutes when he provided a cool finish to a blistering counter-attack which left Posh stunned.
Any home supporters privy to the knowledge Peterborough had not taken a single point after going behind would not have been surprised to see Haroun head home the second shortly afterwards.
However, Peterborough staged an unlikely comeback when on-loan striker Dwight Gayle struck either side of half-time to turn the game on its head.
Both sides pushed hard for a winner but Miller's speculative effort surprised Posh stopper Robert Olejnik to extend Darren Ferguson's side's winless run to eight games.
Peterborough could scarcely have imagined how their first spell of sustained pressure would end as Middlesbrough executed a devastating counter-attack to break the deadlock.
Scott McDonald dispatched a diagonal ball right into Haroun's path and the Belgian midfielder strode forward with purpose before slotting past Olejnik.
Their wait for that second goal did not last long as Haroun made it 2-0 inside 20 minutes, with Stuart Parnaby delivering from the right and Haroun proving he was the hungriest man inside the box by running across his marker to meet the cross and nod home.
Tommy Rowe snatched at a chance as Peterborough looked to get themselves back in the contest, but Boro were looking comfortable until Gayle's thumping finish seven minutes prior to the break, feigning one way, then shuffling the ball on to his right foot before rifling into the top corner.
The London Road faithful were taking a shine to Gayle's work ethic and he endeared himself to them even more with the leveller seven minutes into the second period.
The 22-year-old won the corner himself, drawing Jason Steele into a smart stop from a tight angle, before he prodded home Lee Tomlin's set-piece delivery.
However the killer blow 14 minutes from time, when Miller, who had been on the pitch for only three minutes, tried his luck from the edge of the penalty area and Olejnik was beaten by a shot which lacked any great deal of power or pace.