The comeback left Nadal unusually pumped up for an early-round match. When he closed out the victory, he threw an uppercut, leaned back and screamed at the sky as the stadium crowd roared.
"It was a good feeling to have a comeback like I had today," Nadal said. "He was doing everything good, but I played a great second and third set."
The match was the 1,000th for Nadal, who improved to 822-178.
Seeded fifth, Nadal is a four-time runner-up who has never won Key Biscayne -- perhaps the most glaring gap on the resume of the 14-time Grand Slam champion.
No. 3 Milos Raonic pulled out after aggravating a right hamstring injury that had sidelined him for nearly a month. Raonic withdrew before his match against American qualifier Jared Donaldson, who advanced to the fourth round.