Dutch league leaders AZ went ahead via Brett Holman's goal right at the end of a first half in which Valencia had looked very comfortable for the most part.
The Spanish side then drew level six minutes after the break via Mehmet Topal's fine header, but Maarten Martens struck with 11 minutes remaining to hand the advantage to Gertjan Verbeek's side.
Valencia, as usual looking like the best of the rest in La Liga behind top two Barcelona and Real Madrid, looked far more likely to open the scoring.
Roberto Soldado almost capitalised on some defensive confusion with eight minutes played, but was forced wide by goalkeeper Esteban Alvarado and hit the side netting. Soldado had an even better chance moments later from a short corner, which eventually saw Jordi Alba cross to the Spain striker, whose prodded effort at the near post forced a good reaction save from Alvarado.
AZ striker Jozy Altidore was often ploughing a lone furrow up front, and had to contend with being constantly man-handled by defender Angel Dealbert, something referee Martin Atkinson and his fellow English officials seemed disinterested in penalising.
The USA international managed to use his strength to hold the ball up with both centre-backs nipping at his heels. The ball broke for Johann Gudmundsson, who surged forward but could only fire high from range.
Tino Costa forced a fingertip save from Alvarado with a drilled free-kick which swerved in front of the keeper, but as the fourth official's board went up to show one added minute at the end of the first half it was AZ who took the lead.
Martens's corner to the far post found Holman completely unmarked, and the Australian guided a well-struck volley inside the far post.
AZ emerged after half-time with real swagger, and almost doubled their lead soon after the restart when some excellent build-up involving Altidore and Gudmundsson saw Adam Maher fire into the side netting.
Valencia drew level via Topal. The midfielder, who scored the winner away at Stoke in the last round, rose above his marker to head Ricardo Costa's cross back past Alvarado.
AZ once again had Alvarado to thank for keeping the score down as he twice more denied Soldado in quick succession as the hour mark approached. First he got a strong hand to parry the low shot at the near post before tipping Soldado's guided effort over the bar from the resulting corner.
Valencia looked content to go back to southern Spain with an away-goal advantage, but AZ pushed for the winner and it duly arrived on 79 minutes. Having had his own goal created by Martens, Holman returned the favour by pulling the ball across the box from the left and it rolled perfectly for the Belgian to side foot a calm finish home for the winner.
The two sides will resume hostilities next Thursday at the Mestalla, with the winner facing either Atletico Madrid or Hannover in the semis for a place in the Bucharest final.