The Premier League club drew first blood on 24 minutes when Danny Graham found the target with a right-footed shot from close range.
Swansea could have doubled their advantage four minutes later when Nathan Dyer took an attempt on the Barnsley goal, but Ben Alnwick parried it for a corner.
Kyle Bartley's header from Jonathan de Guzman's delivery then went over the crossbar.
Chris Dagnall came close to restoring parity on two occasions thereafter, but both times his shots were blocked and resulted in corner kicks.
The Swans doubled their advantage in the 59th minute when Luke Moore found the target from the edge of the Barnsley penalty area.
However, 10 minutes later the visiting team halved the deficit when Bobby Hassell headed home from just inside the penalty area.
Swansea, though, were in no mood to panic, as Moore netted his second goal of the evening on 88 minutes with a right-footed shot from close range to wrap up a 3-1 victory for the hosts.