A much-changed Leicester side were unable to cope with the threat of the Belgian striker.
Shakespeare had won all of his first six matches in charge, five of them in the Premier League, since replacing the sacked Claudio Ranieri in February.
A much-changed Leicester side, without their regular full-backs or midfielder Wilfred Ndidi, and with Riyad Mahrez appearing only as a substitute, were unable to cope with the threat of Lukaku.
The Premier League's leading scorer took his goal tally in the competition to 23 for the season with a fine header and a clinical close-range finish.
Shakespeare's decision to make five changes suggested he had one eye on Wednesday's Champions League quarter-final first leg away to Atletico Madrid.
Leicester were behind after just 31 seconds, yet were soon in front.
Everton scored from their first attack as Kevin Mirallas raced through the centre and was pulled down by Daniel Amartey.
As the home fans appealed for a foul, teenage midfielder Tom Davies latched onto the loose ball and pushed it past Kasper Schmeichel.
Shakespeare's side responded positively and were level with just four minutes on the clock.
Demarai Gray broke and with the Everton defenders standing off, rolled a pass to his right for Islam Slimani to slot under Joel Robles.
Everton's goalkeeper, exposed for the equaliser, was at fault as Leicester took the lead in the 10th minute.
Jamie Vardy won a free-kick after he was fouled out on the left.
Marc Albrighton swung it in with his right foot and the ball sailed in at the far post, with Robles caught out of position anticipating a cross.
The goalkeeper looked uncertain after that as he used his feet to block a tame Gray shot that appeared easy to gather.
But Everton did recover their composure to draw level midway through the half with a fine goal.
Ross Barkley found space on the right to whip over a cross with plenty of pace and Lukaku escaped Leicester's centre-backs to power a header past Schmeichel.
Still there was time for more drama before the half came to a close, with Mirallas and Huth booked following a tangle that became a full-on confrontation that drew in several players from both sides.
After that, Barkley was sent clear as Leighton Baines won the ball 40 yards out and went round Schmeichel, who recovered superbly to block as the midfielder looked set to find an empty net.
From the resulting corner, taken by Mirallas, captain Phil Jagielka rose to head in his second goal in two matches.
The chances continued to come after half-time, although not with quite as much frequency.
Mirallas steered a curler into Schmeichel's arms at one end and Slimani's cross-shot from the left rolled just past Robles's near post at the other after taking a deflection off Morgan Schneiderlin.
The game's sixth goal was not far away, though, and it turned out to be Everton's fourth.
It came from another Mirallas corner, which Jagielka headed against the back of Leicester midfielder Andy King, before the ball dropped to the far post for Lukaku to drive in.
Shakespeare brought on Mahrez for the final half hour in an attempt to make life uncomfortable for Everton.
His counterpart, Ronald Koeman, responded by introducing Gareth Barry to shore up the home side's midfield.
Leicester were not quite finished, though.
Leonardo Ulloa, their final substitute, would have pulled one back, but his header from a Mahrez corner struck Idrissa Gueye full in the face and he was then foiled by Robles.