The Minstermen, managed by former Celtic player Jackie McNamara, will be hoping to earn promotion back to League Two after being relegated this season.
Robinson, 22, has helped Crusaders clinch back-to-back Premiership titles after joining from Rangers in 2012.
Meanwhile, former Portadown full-back Ross Redman has signed for Glentoran.
Conor McMenamin has left Glentoran to sign for Warrenpoint Town.
A statement from Crusaders said the club had accepted a financial package from York for Robinson's services.
"Josh leaves Crusaders with the best wishes of the entire club, and it is hoped he can fulfil his ambitions in full-time football," said the Crusaders statement.
Crusaders defender Josh Robinson is set to leave the Irish Premiership club after the Seaview outfit agreed a deal with National League side York City.