The left-back, who was a consistent performer last season, was surprisingly not offered a new contract this summer and was let go.
But the 29-year-old will remain in the National League with the newly-promoted Minstermen.
Whittle has had a previous spell at the club, spending two years there between 2016 and 2018, winning the FA Trophy in 2017.
Chesterfield re-sign former Notts County goalkeeper who has recently been playing European football
How Chesterfield could line-up against Aldershot Town
Why Chesterfield manager Paul Cook will continue to not select a goalkeeper on bench
Chesterfield set to announce signing of new goalkeeper ahead of Aldershot Town clash
'Active at both ends of market' - Chesterfield boss Paul Cook on latest transfer activity at Spireites
He joins fellow defender Fraser Kerr, who was also released by the Blues, at York for the upcoming season.
The Minstermen were promoted from the National League North last season through the play-offs, and Whittle thinks they hav a chance of going up again.
“I’ve always had a look at [the team] especially when the new manager came in and I was rooting for them in the play-offs,” Whittle said.
“I’ve had two really good seasons, especially the last 18 months, we’ve (Chesterfield) gone for promotion and I’ve scored a few goals as well.
“I think we can go quietly under the radar [this season]. Obviously, there are big clubs at this level who have a lot of money – they will get all the talk - but we are quietly confident. I’ve seen some of the signings we’ve brought in - there are some good players here.”
He added: “We want to aim for promotion but if not then definitely play-offs.
"I want to play as many games as possible and kick on again.”