The League Two side looked to have got the better of their South Yorkshire neighbours but Maguire sidestepped his man and rifled a 20-yard shot past Tommy Lee to keep Dave Jones' side unbeaten in pre-season.
Jones handed a start to striker Atdhe Nuhiu, a free transfer from Rapid Vienna, and he went close to making a swift impact with a driving shot into the side-netting.
But the Spireites who took the lead after 29 minutes when trialist Hamza Bencherif rose highest to head a Gary Roberts cross beyond Chris Kirkland.
Drew Talbot missed a great chance to double the advantage early in the second half, firing rashly wide when he had time to steady himself, and Chesterfield were made to pay.
Nuhiu had seen a header to the back post well saved and Paul Corry nodded a Jermaine Johnson cross wide but Maguire finally made Wednesday's breakthrough with a shot that went in off Lee's right-hand post.