A brace from Danny Hylton and a stunning strike from Peter Vincenti saw off Fleetwood, who slumped to their third defeat in as many games.
They took the lead after 11 minutes at Highbury Stadium on Saturday, Junior Brown stabbing the ball home at the back post from an Alan Goodall free-kick.
And Mellon's men set up a grandstand finish when David Ball tapped home Steven Gillespie's deflected shot with three minutes remaining.
Alex Mellon almost grabbed an equaliser deep into injury time but could not quite get a toe on Dean Howell's cross
Mellon said: "We're desperately disappointed. We, as a group, have let the football club down. We didn't show enough fight, right from the start, in an FA Cup tie.
"Some of the goals we gave away, I don't know where to start. We're just not making teams work hard enough to score against us at the minute."