The hosts fell to the Toffees at Old Trafford for the first time in 21 years as the champions' title rivals opened up a larger gap at the top of the table
Bryan Oviedo silenced the Theatre of Dreams on the 85th minute to secure three points for the Toffees and consign the champions to their first defeat since September.
Moyes spent 11 years as manager at Goodison Park before replacing Sir Alex Ferguson at United, but he was given a hostile reception from Everton fans and they rejoiced at full-time after an impressive victory against their former boss.
Wayne Rooney, Patrice Evra and Danny Welbeck were all denied by the woodwork, but Everton was impressive and had chances of its own before the Costa Rican left back struck four minutes from time.
Victory for Martinez's men stretched their unbeaten run to seven games and left United well off the pace in the race for the title.
Marouane Fellaini returned to face his former club, with Ryan Giggs and Rafael also included for the hosts, but Robin van Persie (groin) remained sidelined.
Ross Barkley and Kevin Mirallas were restored to Everton's starting lineup at the expense of Leon Osman and on-loan winger Gerard Deulofeu, who impressed in his first Premier League start against Stoke City on Saturday.
Mirallas almost marked his recall with a goal after just eight minutes, when he cut in from the left and stung David de Gea's palms with a venomous right-foot drive from 20 yards out.
Moyes was given a hostile reception by the Everton fans when he ventured into the technical area for the first time before former United goalkeeper Tim Howard got down well to deny Rooney at his near post 15 minutes in.
Howard had to be alert once again to thwart Shinji Kagawa and Giggs' header flashed wide of the far post as United got into its stride.
The Everton keeper was beaten after 28 minutes, but Rooney's deflected shot came back off the post before Howard came out to tackle the ball to safety.
Romelu Lukaku was a constant menace to the United defense in a frantic first half and De Gea saved the Belgium striker's effort with his feet five minutes before the break.
Moyes replaced Kagawa and Rafael with Nani and Adnan Januzaj just 12 minutes into the second half after Everton came out strong following the interval.
The visitors were bossing the midfield and Oviedo fired narrowly wide of the near post before Rooney was booked for a late challenge on England teammate Phil Jagielka.
Deulofeu replaced the impressive Barkely after 68 minutes and was presented with a great opportunity to open the scoring within a minute of coming on, but De Gea denied the winger after Lukaku had played him in down the right.
United was twice thwarted when Evra's header was denied by Howard and Danny Welbeck then headed the rebound against the bar from eight yards out.
Mirallas' free-kick rattled the post for the visitors, but Everton won it late on when Lukaku's cross was tucked home at the back post by the onrushing Oviedo.
Follow GOAL.COM USA on