The Tykes, on a seven-match winless run and without finding the net in their previous four, took the lead after 24 minutes courtesy of David Cotterill's first goal for the club.
The hosts made things difficult for themselves when Nathan Doyle was dismissed 13 minutes before the break but they held on to pick up a crucial win and stop the rot.
Keith Hill's side created the first opening inside two minutes as Matty Done's inswinging corner was headed wide by Jimmy McNulty.
Craig Davies then tried his luck from distance but Paul Jones showed solid handling under pressure.
Barnsley capped their promising start with a goal midway through the opening half when Cotterill steered home from the edge of the box after good work down the left wing by Doyle.
A lapse in concentration in the home defence afforded Tommy Rowe the opportunity to shoot from distance but he pulled his shot well wide.
Darren Ferguson's men were given a timely boost just past the half hour mark when Doyle's late challenge on Lee Tomlin earned him a straight red card.
Posh sought to make their numerical advantage count before the break and Tomlin's dipping effort forced a strong save from David Button.
The home side still offered a threat going forward and could have doubled their lead just prior to half-time when Cotterill's free-kick was nodded wide by Davies from six yards.
And in the final action of the half Grant McCann had to be alert to head away Cotterill's searching corner.
Rowe looked to get Peterborough on the front foot early in the second half as he delivered two teasing crosses from the left but his team-mates failed to capitalise.
Ferguson made a double change with an hour gone, introducing David Ball and Mark Little from the bench as Tomlin and McCann made way.
Craig Alcock's ambitious effort from distance highlighted how well the Tykes were doing to restrict their opponents, despite being a man light.
Emile Sinclair went closer with an 18-yard volley in the 69th minute which flashed narrowly wide of the target and Button denied Little as he got a shot away from inside the area.
The visitors wasted a late chance to level when Sinclair nodded wide from Tyrone Barnett's flick-on.