Rangers threatened sporadically with Mikele Leigertwood sending a 25-yard strike narrowly wide, while Rowan Vine shot tamely at North End keeper Andy Lonergan from 12 yards.
But the home side ended the first half strongly and Simon Whaley saw his twice deflected shot loop inches over the bar before Parkin broke the deadlock by seizing on a weak backpass from Kaspars Gorkss and rounding Radek Cerny to score from a tight angle.
Whaley should have doubled the lead but shot straight at Cerny from six yards after after Agyemang and Hogan Ephraim went close for Rangers at the start of the second period, the former - an ex-Preston player - levelled after racing onto a neat through ball from Vine and sliding the ball beyond Lonergan via a slight deflection.
Preston piled forward in response and Cerny kept out a glancing header from St Ledger but he could not keep out another effort from the defender after Jon Parkin's long throw had been flicked on by Chris Brown.
Rangers finished the stronger, however, and the home side were left clinging on as Youl Mawene cleared off his own goal-line in the third and final minute of injury time and, from the resulting corner, Darren Carter kicked Matt Connolly's header out from under his own crossbar with the last kick of the game.
Preston manager Alan Irvine:
"To be honest, I didn't think we'd get in the play-offs, so it's a fantastic achievement by the lads.
"It's amazing to think how far we've come since this time last year, and it's also an amazing response to what was probably the lowest point I've had in my time here (a home defeat to Blackpool in April that looked to have ended their hopes of a top-six finish).
"I don't know how many times a team has won their last four games in the Championship, but it won't have happened many times.
"We've now had a really good season, and it could become a great one."
QPR caretaker-manager Gareth Ainsworth:
"Make no bones about it, we wanted to come here and win the game and finish the season well.
"I think attacking-wise it was probably one of our best displays. We played some really good stuff, and but for our final ball we could have scored a few more.
"We had one cleared off the line in the last minute, and that's testament to how we went right to the end.
Lonergan, Jones, St. Ledger, Mawene, Nolan, Whaley (Nicholson 79), McKenna, Carter, Sedgwick, Parkin (Elliott 88), Mellor (Brown 61).
Subs Not Used: Neal, Chilvers.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.