Substitute James Vaughan scored the winner as Everton ended AZ's unbeaten home record in European competition.
Vaughan finished from a difficult angle to secure victory for Everton
Everton had already secured top spot in Uefa Cup Group A but they went ahead after 63 seconds when Andy Johnson finished at the near post.
Graziano Pelle's precise shot brought the hosts level but Everton led at the break thanks to Phil Jagielka's header.
Kew Jaliens headed AZ level but Vaughan shot home from a tricky angle to secure a superb win and send the hosts out.
AZ had surpassed Ipswich's record of 31 unbeaten home matches in European competition with victory over Larissa in their previous Uefa Cup game at their DSB Stadion.
They went into the game against Everton still needing a win to reach the last 32 and they must have felt confident against a side who had little to play for.
Everton boss David Moyes gave several fringe players a chance to shine, with James McFadden, Thomas Gravesen, Victor Anichebe and keeper Stefan Wessels all coming into the side.
It was an unfamiliar formation too, with McFadden playing just behind the front two and Tony Hibbert protecting the back four in a diamond.
Despite all that, Everton made the perfect start, Johnson showing great determination in the box to shrug off a strong challenge before shooting through another defender's legs and in at the near post in the second minute.
Everton had the momentum but it was suddenly wrested from them when AZ equalised via a swift counter-attack, Pelle latching on to Gretar Steinsson's pass and finishing low into the far corner.
AZ's quick passing had the Everton defence scrambling at times but the hosts were punished for failing to make their possession tell.
Just before half-time, Johnson, who was clearly out to impress Moyes, again showed his strength, controlling a corner and setting up Joleon Lescott.
Jack Rodwell, 16, came on after 80 minutes to make his Everton debut
Lescott's shot was cleared off the line only for Jagielka to head in his first goal for the club since his £4m move from Sheffield United in the summer.
In an entertaining game, AZ made it 2-2 after 65 minutes when Jaliens rose at the far post to head home Julian Jenner's inswinging corner.
But Everton had the final say, Vaughan hitting a first-time shot from Anichebe's pass which trickled past Boy Waterman and crept over the line.
There was still time for Jack Rodwell to make his bow for Everton, meaning the 16-year-old defender was on the pitch at the final whistle as his team celebrated a 100% record in Group A.
Everton boss David Moyes:
"They all performed really well against a good AZ side.
"I think we're getting stronger as we go along. We've not won anything but that takes time.
"We've got players in good form but they have to keep their form up because they've seen tonight there are players pushing to come into the team."
AZ: Waterman, Jaliens, Opdam, Pocognoli (Agustien 77), Mendes Da Silva, Cziommer (El Hamdaoui 66), Dembele, De Zeeuw (Jenner 65), Steinsson, Vormer, Pelle.
Subs Not Used: Romero, Koenders, Donk, Medunjanin.
Goals: Pelle 16, Jaliens 65.
Everton: Wessels, Hibbert, Jagielka, Lescott, Nuno Valente, Pienaar (Vidarsson 69), Gravesen (Rodwell 80), Carsley, McFadden, Anichebe, Johnson (Vaughan 68).
Subs Not Used: Ruddy, Jutkiewicz, Boyle, Irving.
Booked: Hibbert, Wessels.
Goals: Johnson 2, Jagielka 44, Vaughan 79.
Ref: Selcuk Dereli (Turkey).