The Spanish duo were pushed all the way by Dutch pairing Tallon Griekspoor and Wesley Koolhof, but emerged 6-4 6-6 (2-7) 10-2 victors on Court Suzanne-Lenglen.
Nadal exited the singles following a defeat to long-time rival Novak Djokovic, but started impressively as the pairs exchanged rallies in the opening exchanges.
But a break in the seventh game for the Spaniards saw them assume full control of the first set, with Alcaraz serving out the final game to hold the early advantage.
However, Griekspoor and Koolhof would respond, with the Dutch pair able to dominate a second-set tiebreak, taking the encounter to an exciting conclusion.
But Nadal and Alcaraz would roar to victory, securing their passage to the next stage in the deciding third set after Griekspoor slammed an Alcaraz serve into the net.
Next up for the all-star Spanish duo is a clash with fourth-seeded Americans Rajeev Ram and Austin Krajicek.
Data Debrief: Nadalcaraz continue to shine
The combination of youth and experience worked to its full effect at Roland-Garros, with Nadal and Alcaraz once again showing their gold medal credentials.
Nadal and Alcaraz saved all three of the break points they faced, ending the contest by winning 81% of their first serve points.
The reigning French Open champion was pushed all the way in his straight-sets victory, getting a 6-1 7-6 (7-3) win in one hour and 48 minutes.
It looked like it was going to be another routine match for the Spaniard at Roland-Garros as he raced into a 3-0 lead in the first set, and even after Griekspoor pulled one back, Alcaraz's aggressive approach saw him take the lead.
The Dutchman found his fight in the second, though, with the players matching each other stride for stride. Griekspoor threatened to take the set with a break, but Alcaraz successfully defended it before forcing a tie-break.
Alcaraz then turned on the style when he needed it most, winning the last four points in a row to book his place in the next round, where he will face Roman Safiullin.
Data Debrief: Alcaraz gets the job done
Unlike his opening round, when he cruised through with a 6-3 6-1 victory over Lebanon's Hady Habib, Alcaraz was made to work hard for this victory.
Despite the stern test, Alcaraz did not drop a single service game, successfully saving two break points.
He is back in action on Tuesday when he will once again pair up with Rafael Nadal in the men's doubles.
The Spaniard, who overcame fitness concerns in his win over Tallon Griekspoor in the last round, dominated on Court Suzanne Lenglen to win 6-4 6-2 in an hour and a half.
Alcaraz made his intent clear from the start, breaking Safiullin twice in the opening three games to race into the lead.
The Russian regained his footing shortly after to make it a more even affair, but he managed just one break as Alcaraz cruised through the first set.
The 21-year-old made a similar start in the second and twice threatened to take a three-game advantage over his opponent, but Safiullin successfully defended two break points to make it 3-2.
He could not do the same on his next serve though, and Alcaraz won the last three games in a row to set up a meeting with the United States' Tommy Paul in the last eight.
Data Debrief: Just no stopping Alcaraz
Alcaraz has reached the quarter-finals in every high-profile tournament he has entered, winning the last two such events at the French Open (at Roland-Garros) and Wimbledon.
He is also the youngest player to make the men's singles quarter-finals at the Olympics since Novak Djokovic in Beijing 2008.
The Spaniard won in straight sets, 6-1 7-6 (7-3), but had to take a medical timeout partway through the second to receive treatment.
After a comfortable first set, Alcaraz was then pushed all the way to make it into the third round in the men's singles, while he is also competing in the men's doubles with Rafael Nadal.
Alcaraz was quick to downplay the injury, noting how he has not let it affect him in recent tournaments, including his Wimbledon win earlier this month.
"It's a problem I've been having since the last few tournaments and I have to pay special attention to that area," Alcaraz said after the match.
"Tennis players have a very demanding schedule, you play more matches and problems arise, but the good thing is that I know how to deal with those discomforts and how to recover.
"It's an area where I've been feeling it for several months, but I've been able to play perfectly in the last few tournaments and this one will be no different."
Alcaraz and Nadal will play Netherlands' Griekspoor and Wesley Koolhof in doubles on Tuesday before the 21-year-old's third-round meeting with Roman Safiullin later in the week.