Everton teenager Dan Gosling struck a dramatic winner two minutes from the end of extra-time to settle the FA Cup fourth round replay against Liverpool.
Liverpool, who lost Steven Gerrard to injury early on and saw Lucas Leiva sent off in the second half, looked to be surviving for a penalty shoot-out.
But Gosling, 19 last Monday, showed remarkable composure to curl home a clever finish past Pepe Reina.
Leon Osman hit the post for Everton, who meet Aston Villa in the next round.
Everton deserved victory for their more positive approach in a typically abrasive encounter that turned into a war of attrition.
Liverpool, who ran out of steam in extra time as they tried to hang on in extra time, are now left to concentrate on the Premier League and the Champions League.
Boss Rafael Benitez resisted the temptation to rest his big guns, with both Gerrard and Fernando Torres included in the starting line-up.
Xabi Alonso posted the first moment of danger when he fired an angled 25-yard drive just wide with Everton keeper Tim Howard beaten.
Liverpool suffered a major setback after 15 minutes when captain and inspiration Gerrard limped off with a hamstring injury, to be replaced by Yossi Benayoun.
The rest of the first half was a scrappy mess, with no quality on show and the play punctuated by a succession of stoppages.
Everton's Tim Cahill picked up a yellow card following an aerial clash with Jamie Carragher, and he was followed by team-mate Steven Pienaar for a nasty late tackle on Lucas.
Sabiha GokcenLucas picked up a booking of his own early in the second half, as did Everton captain Phil Neville as there appeared little chance of any football breaking out amid the physical exchanges.
Everton midfield man Marouane Fellaini had been having a nightmare, to put it mildly, and it was no surprise when he was replaced by Gosling after 52 minutes.
It took an hour for the first serious chance to be created, and it came following a mistake from the previously faultless Phil Jagielka.
He conceded possession, allowing Alonso to find Albert Riera, but Howard was swift to race off his line to block the Spaniard's effort.
Everton then came desperately close to breaking the deadlock after one of the game's more fluent moves.
Mikel Arteta played in Cahill, who set up Osman - only for the midfield man to crash a shot against the post when he should have scored.
Liverpool were reduced to 10 men with 15 minutes left when Lucas, having already been given a yellow card, left referee Alan Wiley no option other than to send him off after a cynical trip on Joleon Lescott.
Everton, understandably, then had the majority of the possession in the closing stages, but Liverpool's defence held firm.
Osman was the threat again six minutes into injury-time, but Reina saved well and then recovered brilliantly to deny Gosling.
Cahill then headed the resulting corner from Leighton Baines agonisingly wide.
Torres had suffered a fruitless evening at the hands of Jagielka, and he was eventually substituted after 101 minutes.
Such was Everton's desperation to get the game won before the lottery of penalties that boss Moyes even gave Dutch outcast Andy van der Meyde a rare outing as substitute.
And it was his cross that paved the way for Gosling to settle a gruelling Merseyside derby and spark wild celebrations from the Everton fans inside Goodison Park.
Everton: Howard, Hibbert, Jagielka, Lescott, Baines, Osman, Fellaini (Gosling 52), Neville (Van der Meyde 106), Arteta, Pienaar (Rodwell 60), Cahill. Subs Not Used: Nash, Yobo, Castillo, Jacobsen.
Booked: Cahill, Pienaar, Neville, Arteta, Hibbert.
Goals: Gosling 118.
Liverpool: Reina, Dossena, Carragher, Skrtel, Arbeloa, Kuyt, Alonso, Gerrard (Benayoun 16), Leiva Lucas, Riera (Mascherano 80), Torres (Babel 101).Subs Not Used: Cavalieri, Hyypia, Agger, El Zhar.
Sent Off: Leiva Lucas (76).
Booked: Leiva Lucas, Alonso.
Ref: Alan Wiley (Staffordshire).