The Tykes, who had not won their first home league match of the season since beating Swindon 2-0 in August 2005, were without a win in 11 Championship games, their last victory coming at home to Nottingham Forest on March 16.
However, McCarthy's blunder proved enough to ensure the Reds got up and running on this occasion.
Diego Arismendi made his debut for the hosts, while Stephen Foster, who was expected to miss out with concussion, was a surprise inclusion in defence.
Palace included Neil Danns, who was available again after serving a suspension, Owen Garvan, who returned from international duty, and David Wright (hamstring) in their squad.
The home side started the brighter with Adam Hammill continually raiding down the left, while Jay McEveley shaved the top of the crossbar with a retaken corner inside the opening five minutes.
Barnsley goalkeeper Luke Steele had to come for a dangerous-looking cross from young midfielder Kieron Cadogan, another product of the youth set-up at Palace, as he wound his way to the byline with 13 minutes gone.
McEveley was booked for a nasty challenge which saw his boot make contact with Alan Lee's face, the vastly experienced frontman making his 400th career league appearance.
Arismendi then headed tamely at Julian Speroni, before the Argentinian goalkeeper came racing off his line to punch a Kieran Trippier centre to safety with Andy Gray lurking dangerously in the vicinity.
Barnsley were in the ascendancy and they got their reward in the 35th minute when McCarthy put the ball into his own net.
Hugo Colace won the ball in midfield before Arismendi picked out a wonderful first-time ball out wide to McEveley, whose driven cross was diverted beyond a stranded Speroni by McCarthy.
Goran Lovre curled just wide of the right-hand post and Hammill had a penalty claim waved away just before the break as the hosts looked to add to their tally.
McCarthy wasted an early chance to redeem himself, heading over after rising completely unopposed inside the Barnsley box just after the interval.
McEveley should have added a second goal for the hosts when Colace slid the ball through, but Speroni produced a superb stop to deny him.
Both sides then traded efforts from long distance before Nathaniel Clyne kept the Eagles in the game when he produced an inch-perfect sliding tackle in the box to block Hammill's goal-bound shot.
Darren Ambrose failed to test Steele after a quickly-taken free-kick fell kindly, while Claude Davis was the subject of handball claims as the game opened up.
Steele did well to save at the feet of Danns in the closing stages as the Tykes hung on for their first three-point haul.