Nadal was taken to four tough sets in almost four hours before winning 6-3, 6-7 (4/7), 6-3, 6-3.
Nick Kyrgios defeated Argentina's Diego Schwartzman 6-0, 6-2, 7-6 (8/6) to storm into the second round at Wimbledon.
Roger Federer, looking to win his 85th career title ahead of the French Open, looked rattled all afternoon. Losing the first set, he eventually prevailed 2-6, 6-2, 7-5, after almost two hours on court.
Ferrer also won his first-round match on Tuesday, defeating Antonio Veic 6-0, 6-3. Ferrer is the three-time defending champion and won last week in Buenos Aires, his second title of the season.