Mark Robins' side have now lost only once in their past seven home games and despite Ian Ashbee and Leon Clarke pulling on Preston shirts for the first time, the Tykes commanded the game.
O'Connor got the better of Cort in the cruellest circumstances to give his side the lead after a surging run from on-loan Manchester City full-back Kieran Tripper had set up the Barnsley attack.
Barnsley could have made it two when Tripper's 64th-minute free-kick found Diego Arismendi unmarked, only for the ball to bounce harmlessly off the Uruguayan midfielder's shins and into Lonergan's arms.
Barnsley ended stronger and Haynes sealed the points after Longergan's poor clearance.
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.