The Argentine eighth seed overcame an early injury scare on Centre Court to see off the Spaniard in straight sets.
"I think I played my best tennis in this match," Del Potro told BBC Sport. "I'm so happy with my level. I beat one of the biggest players of the season. I played well and I'm so happy."
Del Potro will face Novak Djokovic on Friday for a place in Sunday's final.