Barnsley are now 21 points behind Yorkshire League leaders Harrogate after losing heavily at bogey side York.
York have won the league for the last five years and have now beaten Barnsley 13 times in a row.
The Shaw Laners batted first and were skittled for 123 as Matt Wilson top-scored with a resilient 33.
In reply, captain Richard Wilkinson and Simon Widdup took a wicket each but York cruised to victory with two wickets down and more than 30 overs left.
It was Barnsley's first loss since a coin toss dumped them out of the Heavy Woollen Cup on June 7 and their first defeat in the league since York won at Shaw Lane in May. York are the only team to have beaten Barnsley this season.