Schwartzman, seeded 20, came from a set down - the first he has dropped at the grand slam this year - to win 3-6 6-2 6-4 6-3 to set up a clash with three-time champion Nadal.
Zverev's frustrations boiled over in the fourth set when he was docked a point for an obscenity after earlier hitting a ball into the crowd.
Schwartzman, who has reached the last eight at the US Open for the second time, is enjoying a great run in New York and he saw out the match with a booming forehand winner.