Derbyshire 251 for 9 dec (Came 108) and 166 for 5 (du Plooy 61*) drew with Gloucestershire 383 (Charlesworth 87, Taylor 57*, Gohar 53, Hammond 50)
Gloucestershire were in with a chance of victory when Derbyshire slipped to 28 for 3 but du Plooy's 61 off 77 balls guided Derbyshire to 166 for 5 to secure the draw.
Any late drama looked unlikely at the start when Gloucestershire's main objective was to secure batting points. Charlesworth was also eying a maiden first-class century and, with Tom Price, carried his side to within five runs of 250 when Derbyshire broke the partnership.
Price had already been dropped twice, at short midwicket off Suranga Lakmal and a caught-and-bowled chance to Alex Thomson, before he went for a big swing at the offspinner and miscued to cover.
The pair had put on 63 from 129 balls and Charlesworth, who had passed his previous best score of 77 not out, secured the first point when he cut Henry Brookes over the slips for four. Charlesworth was then caught behind off a short ball from Brookes and Marchant de Lange's attempts to hit the ball out of the Incora County Ground resulted in a broken bat before he edged Lakmal to second slip
But that was the home side's last success for 18 overs as Taylor and Gohar eclipsed Gloucestershire's highest ninth-wicket stand against Derbyshire of 95 by Mark Hardinges and Carl Greenidge at Derby in 2007.
Taylor drove Luis Reece for six to bring up 300 and dispatched Brookes for another maximum on his way to a 60-ball fifty. Gohar drove Lakmal for six to reach his fifty from 65 balls and set the new ninth-wicket record before he skied the Sri Lankan to mid-off.
The innings ended in the next over but Gloucestershire now had a big enough lead and enough overs left to put the home side under pressure. Any chance of the game meandering quietly to a conclusion vanished when Derbyshire lost three wickets in the space of 17 balls with the arrears still in three figures.
Harry Came held his team together in the first innings but this time he lasted only five overs before he got an edge onto his pad and was caught at gully.
Price struck in the next over with a full length ball that hit Haider Ali in front and alarm bells were ringing when Wayne Madsen went without scoring. The veteran had his off stump knocked back by a ball from Price that straightened to leave Derbyshire in trouble.
Du Plooy decided to be positive from the outset, dancing down the pitch to drive Taylor for six over long-off, but he was close to being run out just before tea, which was taken with Derbyshire 64 behind with 40 overs remaining.
Brooke Guest stayed with his skipper for 13 overs before pulling Ajeet Singh Dale to midwicket the over after du Plooy was dropped on 33 by Miles Hammond at slip off Gohar.
Mitch Wagstaff, in his second first-class innings, shared a stand of 43 from 70 balls although Gohar thought he had him caught and bowled on 7 only for the umpires to rule the ball had not quite carried. Wagstaff faced 48 balls before he fell cutting Gohar but Derbyshire were now in front and Luis Reece joined du Plooy to finally close the door on Gloucestershire.