Nadal made his return after a five-month absence due to injury when he and fellow Spaniard Jaume Munar beat Sebastian Baez and Tomas Martin Etcheverry 6-3 3-6 10-4 in a doubles match in Melbourne on Tuesday.
The 20-time grand slam champion will be back in singles action against Berankis at Rod Laver Arena on Thursday after the Lithuanian qualifier dispatched American Giron 7-5 6-4.
Fifth seed Benoit Paire was trailing 4-6 6-3 5-2 to Henri Laaksonen when the Frenchman retired from the contest.
Alexei Popyrin and Jordan Thompson advanced on home soil, beating Stefano Travaglia 7-6 (7-5) 6-3 and Christopher O'Connell 1-6 7-5 6-4 respectively.
Munar beat towering South African Kevin Anderson 6-4 6-4, while Emil Ruusuvuori, Alex Molcan and Maxime Cressy also made it through.
Marin Cilic racked up the 550th victory of his career at the Adelaide International 1, defeating Thiago Monteiro 6-4, 7-6 (7-3).
Third seed Cilic will now come up against Laslo Djere, who was level at one set apiece with Corentin Moutet when the Frenchman was disqualified after reportedly swearing at the umpire.
Thanasi Kokkinakis fought back to oust Frances Tiafoe in the final match of the day, the Australian wild card winning 3-6 7-5 6-1.
A 6-1 6-2 6-2 victory was as ruthless and rapid as the scoreline suggests, with Djokovic racing through to the third round.
They had played twice before, and Berankis tested Djokovic before losing in two tight sets at August's Masters 1000 tournament in New York.
But Thursday's match produced exactly the same scoreline as in their first clash, seven years ago in the first round of the US Open, and showed the gulf between the world number one and the player ranked 66th on the men's tour.
Victory means Djokovic racked up a 70th win in singles action at Roland Garros, having already reached that mark at the Australian Open, Wimbledon and the US Open.
His French Open wins tally has now equalled that of Roger Federer, who is absent this year as he recovers from knee surgery. Djokovic and Federer sit joint second on the all-time list for the most wins in the men's singles at Roland Garros, behind clear leader Rafael Nadal, who has chalked up 95 victories in 97 matches.
Court Philippe-Chatrier has seen Djokovic come and go quickly in both his matches so far, with the thrashing of Berankis completed in 15 fewer minutes than it took the Serbian to see off Sweden's Mikael Ymer in round one.
The top seed was a cut above the Lithuanian on Court Philippe-Chatrier, cruising to a 6-1 6-4 6-1 victory on Saturday.
Italian teenager Lorenzo Musetti stands in the way of Djokovic and a place in the quarter-finals at Roland Garros after a masterful display from the world number one.
Djokovic served superbly, winning 88 per cent of points on his first serve and not facing a single break point, while also producing another exhibition of returning as he wrapped up a clinical victory in only an hour and 32 minutes.
The 18-time grand slam champion put Berankis under pressure immediately, breaking in the second game and taking a 4-0 lead with an exquisite backhand winner down the line.
Berankis was able to get on the board with a smash to reduce the deficit to 5-1, but Djokovic served out a one-sided opening set in only 26 minutes.
Djokovic did not have things all his own way in the second, but claimed the only break to go 3-2 up and was two sets up when his opponent returned a powerful first serve beyond the baseline.
Berankis was being given the run-around as the legendary Serb treated the crowd to sublime winners and demonstrated his incredible athleticism, letting out a huge roar after going 3-0 up with a blistering forehand.
There was no let-up from 2016 champion in Paris, who sealed a crushing victory with his third break in the third set.
Data Slam: Djokovic makes more major history
Djokovic has only won the French Open title once, but he has made history at Roland Garros. This victory moved him into the fourth round for a 12th consecutive year, which is an Open-era record.
WINNERS/UNFORCED ERRORS
Djokovic – 30/18
Berankis – 20/36
ACES/DOUBLE FAULTS
Djokovic – 5/3
Berankis – 1/3
BREAK POINTS WON
Djokovic – 6/9
Berankis – 0/0
The world number nine downed Slovakian Gombos 6-3 6-4 in Montpellier on Friday to stay in contention to win the tournament for a third time.
Filip Krajinovic stands in the way of Monfils and a place in the final after the seventh seed accounted for Gregoire Barrere 6-2 7-5.
Vasek Pospisil moved into the last four when Richard Gasquet retired at 6-1 1-0 down in his homeland due to an abdominal injury.
David Goffin will take on the Canadian after the second seed saw off Pierre-Hugues Herbert 6-4 7-6 (7-5).
James Duckworth reached his maiden ATP Tour semi-final with a 6-3 7-6 (7-4) defeat of qualifier Roberto Marcora at the Pune Open.
The 96-ranked Australia will come up against Egor Gerasimov, who came from a set down to beat Kwon Soon-woo 4-6 7-6 (7-1) 6-4.
Jiri Vesely and Ricardas Berankis will contest the other semi-final after getting past Ilya Ivashka and Yuichi Sugita respectively.
Seeking his third title at the event, world number nine Monfils triumphed 7-6 (7-4) 6-2 in 82 minutes against the Serbian.
Monfils saved all three break points against Krajinovic in an impressive victory that maintains France's perfect record of ensuring a home player reaches the final of the Montpellier tournament.
The 2010 and 2014 champion will meet Pospisil on Sunday after the Canadian defeated David Goffin in three sets.
Goffin served for the match in the decider but lost three decisive games in a row as Pospisil triumphed 6-3 1-6 7-5 in two hours and 21 minutes.
At the Pune Open, Australia's James Duckworth was beaten 7-6 (7-2) 6-4 by Egor Gerasimov in the semi-finals.
The Belarusian dropped only five points behind his first serve as he reached a maiden ATP Tour final, where he will face Jiri Vesely.
Vesely saved match points for the second round in a row, outlasting second seed Ricardas Berankis 6-7 (8-10) 7-6 (7-3) 7-6 (9-7) in a draining encounter to secure a first final in nearly five years.
A 6-2 7-5 win for Nadal over the Lithuanian qualifier carried the 35-year-old into the quarter-finals of the Melbourne Summer Set tournament.
Playing on Rod Laver Arena, the main show court for the upcoming Australian Open, top seed Nadal was tested by Berankis but came through unscathed, breaking serve to love to clinch the victory.
This was the first time that Nadal had faced Berankis, the world number 104 who briefly entered the top 50 five years ago, and it came as the 20-time grand slam winner battles back from the left foot injury that curtailed his 2021 season.
Nadal had not competed on tour since losing to Lloyd Harris in the third round in Washington in August, and the match practice he gained at an exhibition event in Abu Dhabi last month was followed by him contracting COVID-19.
He is vaccinated though, so was able to travel once he recovered from that brush with coronavirus, and is looking to build up form and fitness before the Australian Open begins.
"Honestly, I've been going through some difficult, challenging moments the last year and a half, but in general terms I'm super happy to be back in competition," Nadal said.
"It's important to start with a victory. It gives me the chance to play another time tomorrow and that's the main thing at this moment because I didn't play for such a long time.
"The main thing is being healthy. That's probably the only thing."
Awaiting Nadal in the last-eight stage will be Dutch player Tallon Griekspoor, who fended off Australia's Alexei Popyrin in three sets.
Determined not to take on too heavy a workload, Nadal has pulled out of the doubles tournament, despite making a winning start on Tuesday when he paired up with fellow Spaniard Jaume Munar.
He elected to play doubles initially to build up some rhythm. "In doubles, things always happen fast," Nadal said. "It makes you feel alive on the tour again. I think that was a positive thing."
Third seed Grigor Dimitrov advanced, seeing off Andy Murray's conqueror Facundo Bagnis in three sets, but Belgian fourth seed David Goffin slumped to a 7-5 6-3 loss against Slovakian Alex Molcan.
At the Adelaide International 1 tournament, there were wins at the last-16 stage for the top three seeds – Gael Monfils, Karen Khachanov and Marin Cilic – but fourth seed Frances Tiafoe was caught out by Australian Thanasi Kokkinakis, losing in three sets.
The 20-year-old American, who took a set off Novak Djokovic and rattled the world number one at the US Open, is shaping up as potentially his country's biggest hope for the future in the men's game.
Californian Brooksby crushed Spain's world number 44 Alejandro Davidovich Fokina 7-5 6-0, and second seed Schwartzman awaits after the Argentinian took down another 20-year-old American, Brandon Nakashima, scoring a 6-4 6-2 quarter-final win.
Schwartzman is the man who ended Andy Murray's hopes at the tournament in Antwerp.
Brooksby, who had to win two qualifying matches to reach the main draw, said: "Tomorrow will be a great match. I'm really looking forward to it. I'll get some rest tonight and get ready to battle again tomorrow."
The other semi-final will see Italian top seed Jannik Sinner take on South African seventh seed Lloyd Harris following their respective straight-sets wins over Arthur Rinderknech and Marton Fucsovics.
There will be an all-Russian semi-final at the Kremlin Cup in Moscow, after Aslan Karatsev and Karen Khachanov won through to the final four.
Second seed Karatsev sank the hopes of Frenchman Gilles Simon, breaking serve five times on the way to a 6-4 6-3 win, while third-seeded Khachanov edged out Australian John Millman. A 7-5 7-6 (7-4) grind featured 19 aces by Khachanov, the 2018 Kremlin Cup champion, who saved four set points in the second set.
Marin Cilic thrashed Pedro Martinez 6-1 6-2 to set up a tussle with Ricardas Berankis, the Lithuanian ending Adrian Mannarino's run with a 6-2 7-6 (7-1) success. Frenchman Mannarino had stunned Russian top seed Andrey Rublev in the previous round.
Just as in his opener against Francisco Cerundolo, Nadal dropped the third set of this match, but he regrouped, as he had two days earlier, to finish it in four.
A 6-4 6-4 4-6 6-3 victory for the 36-year-old will do the job for round two, but it was laboured at times on Centre Court from Nadal, a day after title favourite Novak Djokovic delivered a masterclass against Thanasi Kokkinakis.
Australian Open and French Open champion Nadal sealed it with an ace, his 16th consecutive win in a grand slam match, and the lack of polish at this early stage can be forgiven, given his lack of preparation on grass as he underwent treatment on his troublesome foot.
World number 106 Berankis forced breaks to lead early in the second and third sets, and although the Lithuanian was pegged back quickly enough by Nadal on the first occasion, he held his nerve to take the third set.
A rain delay came when Nadal was 3-0 clear in the fourth set, and that was only an inconvenience, Nadal wasting little time in finishing the job.
With Matteo Berrettini and Roberto Bautista Agut both pulling out of Nadal's half of the draw due to COVID-19, and Denis Shapovalov losing on Thursday to Brandon Nakashima after reaching the semi-finals last year, it is hard to see who might deny the Spanish two-time champion a place in the final, unless Nick Kyrgios or Stefanos Tsitsipas fancy the task. Italian Lorenzo Sonego will be the next to try.
Nadal said: "Every day is a challenge. That's the truth. I didn't play much on grass in the last three years. I need to improve, but I think the fourth set was much better. I think it was a good level of tennis in that set and the serve worked much better at the end of the match and I was able to play more aggressive, while at the beginning there were too many mistakes.
"It's important for me to accept things are not perfect and just keep working, be humble and accept the challenge."
Data slam: Going past Martina
Nadal took his total of singles grand slam wins to 307 with this victory, taking him one ahead of Martina Navratilova, the nine-time Wimbledon champion.
He moves up to fourth place on the all-time list for singles wins in the majors, behind only Roger Federer, who leads the way, Serena Williams and Djokovic.
Nadal of course leads the men's slam race with an unmatched 22 slams.
WINNERS/UNFORCED ERRORS
Nadal – 35/39
Berankis – 35/35
ACES/DOUBLE FAULTS
Nadal – 13/4
Berankis – 3/3
BREAK POINTS WON
Nadal – 4/16
Berankis – 2/5