The two-time champion was forced to come back from a set down before breaking in a thrilling fifth set to win 7-5 6-7 (7) 4-6 6-4 6-4 in almost five hours.
Del Potro bounced back from a set down against his opponent to claim a closely-contested tie-break in the second.
Nadal broke midway through the fourth to put the pressure back on the former US Open champion and force a fifth set, which was evenly balanced and laden with tension.
However, the second seed broke midway through the final set and held his nerve from there to set up his sixth Wimbledon semi-final.
Nadal will play 12-time Grand Slam champion Novak Djokovic in the final four.