Right-back Dimitri Cavare struck the opener and it was 2-0 at the break after an unfortunate own goal from the recalled Will Wood.
That is how the scoreline remained in front of the 11,533 crowd, 281 of which had made the trip from Accrington.
Bans affected both sides. Barnsley were without Cameron McGeehan after his appeal against a three-game ban for violent conduct at Southend was rejected by the FA. Jacob Brown, sent off in the first half against the Shrimpers, also began his three-match ban, meaning both also miss the next two key games against third-placed Sunderland and Doncaster.
Mike Bahre replaced McGeehan and former Yeovil striker Jordan Green stepped in for Brown.Accrington were without goalkeeper Dimitar Evtimov after the Bulgarian was shown a straight red card seven minutes from the end of the 2-1 defeat against Blackpool after throwing a bottle that had been hurled onto the pitch back into the stand housing the away fans.
Former Guiseley goalkeeper Jonny Maxted, who had been out of the side with concussion, returned in goal and left-back Wood replaced Liam Gibson. The visitors also included Hoyland-born Barnsley product Jordan Clark and had Erico Sousa, who spent three years at Oakwell, on the bench.
It was a quiet opening quarter with Cauley Woodrow firing narrowly wide for the Reds and Accrington failing to test goalkeeper Adam Davies.
He had to hold a drive from Adrian Barlaser after Alex Mowatt had gone close at the other end.
Accrington captain Sean McConville was booked for dissent before heading straight at Davies, who did well to retrieve the ball after dropping a long-range attempt from Wood.
The deadlock was broken in the 41st minute when Woodrow, in midfield, fed the ball down the right for Cavare to run onto and calmly slot the ball past Maxted.
He almost added another as Barnsley struck on the counter-attack but this time his shot was blocked and Mowatt curled the rebound wide.
However, it was 2-0 in stoppage time when Maxted failed to go for Thiam's cross and the ball dropped behind him where Wood could only watch in horror as it came off his leg and into the net.
It was almost 3-0 soon after the break but Green's shot from the edge of the area struck the base of a post.
Wood was replaced by striker Paul Smyth as Accrington sought a way back, also bringing on Billy Kee for Luke Armstrong.
Jordan Williams for Green was Barnsley's first change in the 59th minute.
Daniel Pinnilos was booked for bringing down Clark on the left. The free-kick was cleared but Maxted raced towards halfway and knocked the ball back downfield where Kee, in the clear, fired wide.
Barnsley responded and Liam Lindsay met Mowatt's inswinging corner with a downward header which thudded off the midriff of Maxted, who was soon saving from Williams and going down at the feet of Bahre.
Accrington's third attacking change saw Clark replaced by Offrande Zanzala.
Good defending from Ethan Pinnock and Mowatt prevented the visitors from striking back.
Thiam went close at the other end after latching on to Pinnock's diagonal free-kick.
Smyth shot across the face of goal after being releasaed down the right by Kee.
Eighteen-year-old Callum Styles made his Oakwell debut as he replaced Thiam in the 80th minute.
Maxted made a great save from Bahre and a looping header from Kee landed on the bar.
Ryan Hedges replaced Bahre for the closing minutes.