Mellor, who hit five goals for the third week running, led throughout but were pegged back four times before Carl Brindley scored the winner in extra time.
It was a thoroughly deserved victory against the side from the North West Counties reserve league. Mellor hit the woodwork three times and had four times as many goal attempts as the visitors.
Mellor almost took a sensational 20 second lead, Matt Jamieson firing straight at the keeper from the edge of the area.
Matt Cotton's cross was then cleared for a corner and from the flag kick Steve Smith's header was blocked for another corner.
On 12 minutes Cotton then tested the keeper again with a fierce drive and three minutes later the same player shot wide from a good position, after Jamieson slipped him in.
Ben Beer heads wide
Mellor's dominance was due to the power running of Cotton, Jamieson, Parr and Cooke and the intelligent passing of central midfielders Steve Smith and Man of the Match Chris Coram.
The breakthrough came on 38 minutes. Good work by Matt Cotton set up Jack Parr on the right and his cross found Jonny Cooke who drove the ball home right footed just inside the post to the keeper's right.
Jonny Cooke makes it 1-0
Mellor appeared to be in full control of the game but a minute before the break a rash challenge by Ben Beer conceded a penalty and Town were level with their first meaningful attempt on goal.
A minute after the restart a delicious move involving Cotton and Dave Whelan on the left saw the full back cross for Jamieson to head over from seven yards.
Cheadle had their second attempt on goal on 51 minutes, firing high from a good position. A minute later a scramble in the Town six yard box following a Jamieson free kick saw Matt Cotton smash the ball home from close range for 2-1.
Matt Cotton makes it 2-1
Town's defenders struggled to contain Cotton's surging right wing runs and the striker found the byeline again on 57 minutes only to send his cross behind.
On 66 minutes Craig Frisby headed over from a Whelan free kick and six minutes later Whelan was on hand with a last ditch tackle to prevent a Town breakaway goal.
Cheadle now had their best spell of the game and Frisby's full length tackle blocked another promising shooting chance for the visitors.
On 76 minutes Dave Moss replaced Smith, who had an excellent match.
Ben Beer then misread a long pass forward on the right wing and Town's striker sent his shot wide. Carl Brindley replaced an injured Parr on 78 minutes.
On 80 minutes Town headed in from a corner for 2-2.
Matt Cotton then set up Dave Moss who drilled over from the edge of the area.
With five minutes left a powerful Jamieson free kick was fumbled by the keeper and Cooke followed up to score.
Cooke (far left) races in to score after the keeper fumbles
Mellor looked home and dry but on 88 minutes Mellor keeper Jason Wilde had to plunge to his right to turn a fierce drive around the post. The reprieve was short lived as Town equalised for a third time after Mellor's defence twice failed to clear the ball.
In the second minute of extra time Jamieson shot wide from Whelan's corner. Then on five minutes Jamieson hit the base of the post with the keeper motionless. It was all Mellor again and on eight minutes only a desperate challenge stopped Cotton from scoring.
On 12 minutes Whelan was hauled down by two defenders in the area and referee Roy Bowden pointed to the spot. Jamieson duly scored but the referee made him retake the kick because of his stuttering run up, as Cheadle players, in a bit of gamesmanship, shouted that the ball was not on the spot.
Jamieson's reprise was an emphatic as his first kick and Mellor led 4-3.
Jamieson scores from the spot for 4-3
A minute later Jamieson might have earned another penalty as he was dragged to the floor but the referee waved away appeals.
In the first minute of the second period of extra time Brindley skied a chance and two minutes later a Town striker danced through four tackles to score arguably the goal of the game to make it 4-4.
With six minutes left Town then hit the post. But the game was settled by a Mellor break two minutes from time, Cotton hooking in a cross from the byeline which bisected the six yard box for Brindley to gleefully smash home.
Mellor Seconds recorded their first win of the season 2-1 at home (in Brabyns) to Rochdalians. Scott Cassidy and Ian Arnfield scored.
Mellor Thirds lost 2-4 at Droylsden, Tom Bright scoring a brace.
Mellor Fourths won 3-2 at home against Stoconians and go third in Division D. The scorers were Maciek Sobiegraj, Hayden Mills and Adam Somerville.
The 100 Club draw was made. The winner (£80) was Care Needs with number 75. Second (£40) was Andy Coop number 90.