Scottish defender Wallace calmly scored a stoppage-time winner as Millwall rallied from 2-1 down to shock the Toffees, with the hosts profiting from Jake Cooper's disputed equaliser.
Defender Cooper appeared to nudge home Millwall's second goal with his arm, but referee Michael Oliver still awarded the goal despite consultation with his assistants.
Richarlison's opener was quickly cancelled out by Lee Gregory's neat header, with influential defender Cooper claiming the assist.
Cenk Tosun had only been on the field seven minutes when he slotted his third goal of the season to push the near full-strength Toffees into a second-half lead.
But any hopes of Everton killing the tie were quickly snuffed out when Cooper barged his way to another rapid Millwall equaliser.
Furious enough that Cooper's goal was not chalked off, Everton were left to rue another lacklustre performance when Wallace sent Millwall storming into the fifth round.
Everton were sluggish in the first 40 minutes. Lucas Digne headed Shaun Hutchinson's header off his own line, and that after Cooper had nodded well wide from Shane Ferguson's smart cross.
Richarlison swung at fresh air from a Seamus Coleman cross in a rare Everton raid, but the Brazil forward struck lucky with his second attempt on goal.
The ex-Watford striker punted a 20-yard pot shot and somehow Jordan Archer let the ball squirm under his body and into the net.
A lead Everton hardly deserved lasted just four minutes.
Cooper flicked on a free-kick and Gregory raced in between the Everton cover to nod over Jordan Pickford and level the game at 1-1 on the stroke of half-time.
Everton upped the ante after the break, but still struggled for fluency and had no real grip on the midfield battle.
That extra zip was finally rewarded when Gylfi Sigurdsson played in substitute Tosun, who slotted calmly into the corner.
But just when the visitors thought they could pull away, Millwall produced another quick-fire leveller.
Cooper bundled the ball home, appearing to do so with his arm. But despite fiery Everton protests, the goal stood.
Pickford saved Wallace's shot but Cooper wrangled the ball over the line for a second home equaliser.
And Millwall were not done either. Shaun Williams whipped in another dangerous set-piece, and Wallace kept his cool to send the Den into raucous celebrations.