Maynard, who has been transfer-listed after turning down the offer of a new contract with the Robins, had been on the receiving end of significant criticism from sections of the City crowd for the way he conducted his contract negotiations.
But he popped up with the winner in second-half stoppage time to punish wasteful Millwall and send the home fans delirious.
Up until that point the match seemed destined for a goalless draw, as both teams spurned a procession of chances before the break.
Albert Adomah and Marvin Elliott missed good early opportunities for City, while Liam Trotter, Harry Kane, Hamer Bouazza and Liam Feeney all failed miserably in their attempts to beat David James in the home goal.
The game deteriorated after the interval, with neither side able to match the intensity of the opening period. Millwall defender Tony Craig’s miscued clearance that struck a post seemed to be the closest either side would come to breaking the deadlock before Maynard’s late strike.
Bristol City manager Derek McInnes brought Cole Skuse and Brett Pitman into the starting line-up, while Millwall handed debuts to Kane and Josh Wright, but none of the four had even touched the ball when City went inches away from taking the earliest of leads.
Less than 20 seconds had elapsed when a lofted Stephen Pearson centre drifted beyond the Millwall backline and Elliott ghosted in, only to see his sliding effort cleared away from goal by Paul Robinson.
City started at a canter and, after six minutes, Adomah was allowed to run unattended straight through the heart of the Millwall midfield. The Ghanaian shot from the edge of the penalty area, but his effort was parried to safety by Steve Mildenhall in the visitors’ goal.
It took 17 minutes for Millwall to mount a serious attack, with James turning Jack Smith’s deflected effort round a post.
Five minutes later the Lions should have got their noses in front, only for Bouazza to misdirect his close-range effort from Feeney’s pinpoint low cross.
The game settled into a scrappy lull until the 32nd minute, when Mildenhall pulled off a superb save to deny Maynard.
The former Crewe frontman was picked out by a neat reverse pass from Pitman, but his drive struck the legs of the Lions shot-stopper.
That save almost proved crucial for the visitors, as moments later Trotter missed a gilt-edged chance to put Millwall in front – toe-poking wide from less than six yards when he should have hit the target.
Millwall squandered their third golden chance to take the lead eight minutes before the break.
Feeney, dominating Ryan McGivern for pace and skill down the right, picked out an unmarked Kane – but the striker’s free header looped into James’ arms.
With seconds left of the opening period Feeney fired straight at the City goalkeeper when unmarked eight yards out, as somehow the visitors went into half-time on level terms.
Both sides struggled to find rhythm and fluency after the break, with Craig’s long-range volley the closest either team went to a goal before the hour mark.
Pitman’s shot on the turn after 62 minutes barely stung Mildenhall’s hands at the other end, as the excitement of the first half evaporated after the interval.
Alan Dunne deflected Pearson’s effort over the crossbar with 20 minutes remaining, Craig slashed an attempted clearance against his own post and Yannick Bolasie brought a save out of Mildenhall as the home side found the opener ever more elusive.
But in the dying stages Maynard popped up with the winner.
Adomah dinked a delicate cross in from the right, the Millwall defence fell asleep and Maynard stole in to tap home from only a couple of yards out.
It was a sucker punch for Millwall, who seemed to be coasting to a point. For City fans, for one day at least, Maynard was no longer the villain of the piece.