The 31-year-old Spaniard won his ATP-best 51st match of the year by 4-6, 6-3, 6-2, 6-2 over the 24-year-old New York native, who fell to 0-4 against top-10 rivals.
"It's a very important victory," Nadal said. "It's true I didn't play very well tonight but it's true I'm through to the third round."
Nadal, a 15-time Grand Slam champion who captured his 10th French Open crown in June, will face 59th-ranked Argentine lucky loser Leonardo Mayer on Saturday for a berth in the last 16.
Mayer is 0-3 against Nadal, losing most recently in the third round of his 2014 title run at Roland Garros.
"I didn't play very well but tomorrow I will work hard to find better feelings because I know I can do much better," said Nadal, the 2010 and 2013 champion.
The highest-seeded obstacle in Nadal's path to the semi-finals, and a possible first-ever US Open matchup with long-time rival Roger Federer, is Belgian ninth seed David Goffin.
But the tantalising prospect requires three more wins for each of them. "All the matches are difficult but especially here as everyone wants to play their best and if you don't play your best it will be very difficult," Nadal said.
Daniel, 24, took the first set and traded breaks early in the second with Nadal, serving notice the left-handed legend would have a fight to avoid his earliest ouster on the New York hardcourts since the second round in 2004.
But Nadal won the last four games to capture the second set, parlaying forehand volley and down-the-line winners into the key break in the eighth game, and dominated the third set to seize command.
"I was down a set and a break but I had lots of opportunities so if I keep going and working hopefully I will convert those chances," Nadal said.
In the fourth set, Daniel's fifth double fault handed Nadal a break and a 3-2 edge and the top seed broke again with a forehand winner in the seventh game, then denied Daniel on two break points in holding serve to advance.
Daniel, who ousted US wildcard Tommy Paul in five sets in his opener, missed out on his first trip to the third round at a Grand Slam....