Nadal only reached the third round in 2016 but his exit then came because of an injury withdrawal and he marched to a 10th French Open title in 2017 without dropping a set.
He broke Marterer's serve early in the second set and fought back from 3-1 down in the third for a straight-set win against the unseeded 22-year-old.
Nadal, 32, lost his opening service game and trailed 2-0 in the first set before recovering well in Paris.
Eleventh seed Schwartzman snapped Nadal's run of winning 37 consecutive completed sets at Roland Garros when he took the opener 6-4 on Court Philippe Chatrier.
Nadal made 14 unforced errors and struck just four winners in a poor first set, before having both of his wrists strapped by the trainer.
IOS 12: 5 features we first spotted on Android
Don't confuse it with "multiple users.' iOS 12 for iPhone X has a new 'Set Up an Alternate Appearance" option in Face ID settings. Google recently unveiled digital wellbeing features in Android P , and now Apple is adding similar screen time limits to iOS 12.
The players were forced off the court for 40 minutes, but when they returned Nadal levelled for 3-3 and let out a trademark roar of "vamos".
The Spaniard looked to be just a couple of points away from taking the second set when play was halted for the last time, however, serving with a 5-3 and 30-15 lead.
Schwartzman, the shortest player remaining in the men's draw, continued to thrill the Paris crowds with his tenacity and ball striking but was unable to take advantage of three break opportunities as an energised Nadal eventually served out for victory.
Muguruza condemned Sharapova to her heaviest Grand Slam defeat in more than six years and will face top seed Simona Halep for a place in the final against either Sloane Stephens or Madison Keys.
The match had already been stopped for an hour on Wednesday, with Nadal trailing 6-4 2-1, before play resumed at 17:28 BST.
"But today was certainly not one of those steps".