Griffiths, prolific in the SPL for Hibernian last season, showed a good touch to control substitute Lee Evans' throughball before calmly sliding his shot beneath Tommy Lee in the 65th minute.
Lee was beaten for the first time early on as Dave Edwards converted a cut back into the area.
But Chesterfield responded well and Jimmy Ryan forced Carl Ikeme to push his shot wide following a nice piece of skill on the edge of the box before Gary Roberts headed wide.
The Spireites got the goal they had been threatening in the 29th minute with a sweeping finish from Drew Talbot.
Lee produced a spectacular save to keep out Edwards' header on the hour mark but there was little he could do shortly afterwards to stop Griffiths from grabbing what turned out to be the winning goal.