© Getty Images
Chris O'Grady tried to pose an early threat for the visitors, but the striker did not get the service he needed from his teammates to put the Tykes ahead.
With Charlton looking to put some space between themselves and the relegation zone, Marvin Sordell and Johnnie Jackson had a string of chances in a dominant spell for the home side, but they could not find the opening goal.
Against the run of play, Barnsley were able to take the lead shortly before the break when Jean-Yves M'voto headed in from a corner.
The Addicks made an attacking start to the second half, with Diego Poyet firing wide with a 25-yard effort just 15 seconds after the restart.
Jackson tried to level the scores with a free kick from just outside the box, but Luke Steele punched the danger away for the visitors.
Barnsley extended their advantage just after the hour mark when Thomas Kennedy looked to cross the ball in, but Hamer misread the delivery, allowing it to sail straight in.
Obika flicked the ball on for Reza Ghoochannejhad inside the final 15 minutes as he looked to give Charlton some late hope, but Steele made the save.
The home side's hopes of a late comeback were dealt a blow when Rhoys Wiggins picked up a foot injury six minutes from the end, leaving the team a man short as they had already used all of their substitutes.
Despite being down to 10 men, Astrit Ajdarevic tapped one in as Barnsley scrambled to clear the ball, cutting the visitors' lead late on, but Steele was able to collect the ball as they whipped it in again looking for the equaliser.
The result leaves Charlton 21st in the table, while Barnsley climb to 19th, two points from safety.