Ezzalzouli, who made his comeback in the 69th minute, scored the second goal for the hosts in the 99th minute after a pass from Jon Moncayola.
Chimy Avila opened the scoring for the Basque club in the 71st minute. However, Moroccan international Youssef En-Nesyri, who came on in the 77th minute, scored the winner for the Andalusians in the 90th minute.
Osasuna, 7th in the Spanish league, are now in the last four of the King’s Cup for the first time in 18 years.