O'Shea scored two goals in seven appearances for the Spireites during a recent loan spell at the npower League Two club.
He will now remain at the Proact Stadium until the summer of 2014 after completing a permanent move to Paul Cook's side.
"Jay did really well for us during his spell on loan and we're delighted to have signed him on a permanent basis," Cook told the club's official website.
"He is a very talented boy and he will only get better. is a terrific addition to the squad."
O'Shea is eligible to play in Chesterfield's home game against Northampton on Saturday.
- Sports & Recreation