Morsy, who joined the Spireites in the summer of 2013 after leaving Port Vale, would have been a free agent at the end of the season.
Chesterfield anager Danny Wilson said: “We tried our best to keep Sam but he was determined to move on so there was not a great we could do about it.
“We then had to do the best deal we possibly could for the club and that is what we have done. Sam has done very well for Chesterfield and he leaves with our best wishes for the future.”
Wilson has been given the backing to strengthen his squad before the transfer window closes.
Morsy, 24, scored eight goals in 117 appearances for the Spireites.
What are your thoughts on the deal? email [email protected] and let us know