Anything but a win would have seen York relegated into the National League.
But the Minstermen crashed to a 3-0 defeat, with Josh Windass netting twice.
Tarique Fosu-Henry had put Accrington in front on 35 minutes.
Defeat means York have just 33 points from 44 games, with two matches remaining.
Third-from-bottom Newport have 43 points, after their 1-1 draw at Luton.
York manager Jackie McNamara said: “It’s been hanging over us for a few weeks and it’s disappointing but we got what we deserved at Accrington.
“This game was a mirror of our whole season.
“We’ve paid the price for not being good enough in certain games. There are so many things you can put your finger on that have cost us this season but as the manager you take responsibility for everything - it’s my team.
“We need some fight and passion. Everyone can have off-days but we need to rebuild.
“There are a lot of players out of contract and the aim is obviously to go straight back up like Bristol Rovers and Cheltenham. They have shown it can be done.
“We have got to get our recruitment right and everyone has to work together.
“The rebuilding process is going to be important and, hopefully, what I will be judged on.”
For all the latest from today’s games, check out The Yorkshire Post’s live feed by clicking the link below....