Rovers, who were top of Group E at kick-off, conceded four first-half goals and gave away a penalty as they were embarrassed by what was believed to be Barnsley's youngest-ever side in the opening period.
Sixteen-year-old Fabio Jalo helped himself to two goals for the visitors along with former Doncaster loanee Josh Martin.
A second-half brace from substitute George Miller helped salvage some pride, however, with the game finishing 4-2 to Barnsley, who secured qualification.
Doncaster now need Newcastle’s under-21s to take points from Lincoln to qualify.
1. Match action
George Millers takes a shot at goal. Photo: Howard Roe/ahpix.com
2. Louis Jones - 6
Left with little chance given some pathetic defending for the goals but emerged with some credibility after saving a penalty then denying several more goalbound efforts. Photo: Howard Roe/ahpix.com
3. Tom Anderson - 4
Responsible for the first goal when his missed clearance allowed Slobodan Tedic through on goal, who passed to Josh Martin for a tap-in. Later brought Tedic down for a penalty. Photo: Howard Roe/AHPIX LTD
4. Adam Long - 5
Not directly responsible for any goal but can't be exonerated from a dreadful first-half defensive display. Photo: Howard Roe/ahpix.com