It was Derby's fifth home league defeat of the season and the second in four days to pile more misery on Cocu who is self-isolating after the club's chief executive tested positive for Covid-19.
They could have scored more goals before a fine finish by Victor Adeboyejo seven minutes from time sealed Barnsley's third win in four Championship games.
Derby had responded to Wednesday night's home defeat to QPR by bringing in Krystian Bielik for his first senior game since he damaged knee ligaments in January.
The Poland defender was one of three centre-backs but Derby were opened up in the third minute and it needed an excellent save by Marshall to keep out Dominik Frieser's low shot.
Walton rescued Barnsley twice in the space of a minute when he kept out a fierce drive from Tom Lawrence following Nathan Byrne's run in the 21st minute before beating away another effort from the Wales international.
Derby were building momentum until Marshall's attempted clearance went straight to Chaplin, whose drive beat the goalkeeper as he desperately tried to get back.
Barnsley almost scored again when Alex Mowatt fired just wide two minutes before the break but Derby went even closer through Jason Knight who was denied by a goal-line clearance.
Derby made an attacking change, bringing on Kamil Jozwiak at the start of the second half and the home side began to threaten with Waghorn curling a free-kick just over the crossbar before Lee Buchanan fired into the side netting.
But Barnsley had a great chance to increase their lead in the 67th minute when Callum Styles was played in on the left but he fired wide and minutes later Chaplin wasted another opportunity with Derby's defence wide open.
The visitors were getting plenty of chances to put the game beyond Derby and they finally doubled their lead in the 83rd minute through a superb finish by Adeboyejo.
Barnsley broke quickly and Adeboyejo advanced to the edge of the box before curling a low shot past Marshall.
After that, there was no way back for Derby, who have now gone nine home games without a win in the Championship.