Japan forward Maeda opened the scoring in the 16th minute at Parkhead.
But St Mirren, the only Scottish side to have defeated Celtic so far this season, fought back.
It was not until the 76th minute that substitute Reo Hatate was on target from the penalty spot after defender Richard Taylor was sent off for deliberate handball following a VAR check.
Fellow substitute Oh Hyeon-gyu scored his first Celtic goal 10 minutes from time before Mark O'Hara pulled a goal back with a penalty.
Substitute Matt O'Riley struck from the edge of the box before Hatate added a fifth goal in stoppage time for Ange Postecoglou's treble-chasing team.
But some of the shine was taken off the victory after Japan star Kyogo Furuhashi went off with what appeared to be a shoulder injury.
"St Mirren put in a hell of a shift to stop us," said Celtic manager Postecoglou. "It was a great contribution from the guys off the bench."
As for Furuhashi's injury, the Australian added: "We'll get a scan for him tomorrow (Sunday). He's a pretty quick healer."
Earlier, second-tier Inverness made the most of a lucky break to reach the last eight with a stunning 3-0 win over Premiership side Livingston.
Inverness were handed a reprieve following a defeat by Queen's Park in the last round when their Championship rivals were found to have fielded an ineligible player.
And there was more Cup misery for a top-flight side, with Motherwell manager Steven Hammell sacked after a 3-1 defeat by second-tier Raith.
Hammell may be the club's post-World War II record appearance holder, but that status could not prevent him being dismissed following a fourth successive loss in all competitions for his injury-hit side.
"Steven Hammell is and will forever be a colossus in Motherwell Football Club history," chairman Jim McMahon told the club's website.
"Unfortunately, due to a number of factors, his time in charge hasn't worked out the way we all really hoped it would.
"Although this decision has been difficult, we feel it is necessary as we look towards the last third of the Premiership season."