The first chance of the half fell to Chris Dagnall for Barnsley but his 25-yard effort went wide of the post.
John Marquis attempted a spectacular volley with 30 minutes gone, but his effort went well wide of the post.
Neither side was able to break the deadlock and they went in level at the break.
In the second half Barnsley started to get on top and opened the scoring 10 minutes after the break, Dagnall finishing low from Marlon Harewood's cutback.
It got better for the struggling hosts as, just one minute after coming on for his debut, Jason Scotland hammered into the roof of the net from the edge of the box.
There was to be no way back for Millwall and Barnsley held on for a somewhat comfortable three points.