Murray, the 2016 runner-up, reached the third round with a bruising 6-7 (3/7), 6-2, 6-2, 7-6 (7/3) win over Martin Klizan of Slovakia.
Del Potro, playing in Paris for the first time in five years, went through to the last 32 after Nicolas Almagro retired in tears with a knee injury.
The giant Argentine was immediately hailed for his sportsmanship when he embraced the sobbing, stricken Spaniard.
Out on Suzanne Lenglen court, world number 50 Klizan smashed 57 winners but 67 unforced errors as his all-or-nothing game proved in vain against top seed Murray.
"I expected a tough match. Martin goes for his shots, he can hit winners with that forehand from anywhere on the court," said Murray.
The Scot beat Del Potro in a marathon Olympic final in 2016 before Del Potro, now 30 in the world, gained his revenge with a come-from-behind win in five sets in the Davis Cup semi-final.
"It will be very tough. Juan Martin is playing a lot better than his ranking," said Murray as he looked ahead to Saturday's clash.
Del Potro, no stranger to injury after a career-long battle with wrist problems, made the third round after Spanish opponent Almagro quit in tears during the third set with a left knee injury.
In a moving conclusion on Court Two, Del Potro sat next to a sobbing Almagro, offering him water while trying to console the heartbroken 31-year-old.
Del Potro had also gone to the Spaniard's aid when he had collapsed at the back of the court, weeping, just moments earlier.
"I tried to find good words for him at that moment. I say to him, try to be calm. Try to think about his family, his baby," said Del Potro.
"Sometimes the heart is first more than the tennis match."
Del Potro, 28, had taken the first set 6-3 before Almagro claimed the next by the same score.
They were locked at 1-1 in the third when Almagro quit.
Del Potro also suffered an injury scare himself when he pulled up, holding his left groin in the second set.
Third seed Stan Wawrinka, the 2015 champion, reached the last 32 for the 10th time with a 6-4, 7-6 (7/5), 7-5 win over Alexandr Dolgopolov of Ukraine.
Wawrinka will face Italy's Fabio Fognini for a place in the fourth round.
Japanese eighth seed Kei Nishikori routed France's Jeremy Chardy 6-3, 6-0, 7-6 (7/5) and set up a rare all-Asian clash with South Korean Hyeon Chung.
Chung, the 21-year-old world number 67, followed up his first round win over US 27th seed Sam Querrey with a 6-1, 7-5, 6-1 victory against Denis Istomin of Uzbekistan.
Nick Kyrgios's Australian Open ended in a 5-7, 6-4, 6-1, 6-2 loss to big-serving Kevin Anderson of South Africa.
Anderson, ranked at 56 in the world, made the most of the 18th-seeded Australian's 42 unforced errors to progress to the third round where he will face Britain's Kyle Edmund.
Unseeded 21-year-old Karen Khachanov of Russia continued his impressive debut, beating Czech 13th seed Tomas Berdych, a semi-finalist seven years ago, 7-5, 6-4, 6-4.
In the women's event, crowd favourite Eugenie Bouchard's struggles continued with a 6-3, 6-0 loss to Latvian 17th seed Anastasija Sevastova.
Czech second seed Karolina Pliskova and third-seeded Simona Halep of Romania, both firm women's title favourites after the first round exit of world number one Angelique Kerber, look for places in the last 32.
Pliskova has never got beyond the second round in six previous attempts.
The 25-year-old Czech faces Russian world 86 Ekaterian Alexandrova who has never beaten a top five rival.
Halep, the 2014 runner-up, faces German world number 102 Tatjana Maria who is bidding to make the third round for the first time.
Fifth seed Elina Svitolina, a quarter-finalist in 2015 and recent Rome champion, made the third round by beating Bulgaria's Tsvetana Pironkova 3-6, 6-3, 6-2.
Poland's Agnieszka Radwanska, seeded nine, saw off Belgian qualifier Alison Van Uytvanck 6-7 (3/7), 6-2, 6-3.
French Open results on Thursday, the fifth day of the 2017 tournament at Roland Garros (x denotes seeding):
Andy Murray (GBR x1) bt Martin Klizan (SVK) 6-7 (3/7), 6-2, 6-2, 7-6 (7/3)
Juan Martin Del Potro (ARG x29) bt Nicolas Almagro (ESP) 6-3, 3-6, 1-1 -- retired
John Isner (USA x21) bt Paolo Lorenzi (ITA) 6-3, 7-6 (7/3), 7-6 (7/2)
Karen Khachanov (RUS) bt Tomas Berdych (CZE x13) 7-5, 6-4, 6-4
Fernando Verdasco (ESP) bt Pierre-Hugues Herbert (FRA) 6-3, 3-6, 4-6, 6-3, 6-3
Pablo Cuevas (URU x22) bt Nicolas Kicker (ARG) 6-4, 6-4, 6-4
Hyeon Chung (KOR) bt Denis Istomin (UZB) 6-1, 7-5, 6-1
Kei Nishikori (JPN x8) bt Jerrmy Chardy (FRA) 6-3, 6-0, 7-6 (7/5)
Stan Wawrinka (SUI x3) bt Alexandr Dolgopolov (UKR) 6-4, 7-6 (7/5), 7-5
Fabio Fognini (ITA x28) bt Andreas Seppi (ITA) 6-4, 7-5, 6-3
Richard Gasquet (FRA x24) bt Victor Estrella Burgos (DOM) 6-1, 6-0, 6-4
Gael Monfils (FRA x15) bt Thiago Monteiro (BRA) 6-1, 6-4, 6-1
Kyle Edmund (GBR) bt Renzo Olivo (ARG) 7-5, 6-3, 6-1
Kevin Anderson (RSA) bt Nick Kyrgios (AUS x18) 5-7, 6-4, 6-1, 6-2
Feliciano Lopez (ESP) bt David Ferrer (ESP x30) 7-5, 3-6, 7-5, 4-6, 6-4
Marin Cilic (CRO x7) bt Konstantin Kravchuk (RUS) 6-3, 6-2, 6-2
Elina Svitolina (UKR x5) bt Tsvetana Pironkova (BUL) 3-6, 6-3, 6-2
Magda Linette (POL) bt Ana Konjuh (CRO x29) 6-0, 7-5
Anastasija Sevastova (LAT x17) bt Eugenie Bouchard (CAN) 6-3, 6-0
Petra Martic (CRO) bt Madison Keys (USA x12) 3-6, 6-3, 6-1
Elena Vesnina (RUS x14) bt Varvara Lepchenko (USA) 4-6, 6-3, 6-0
Carla Suarez Navarro (ESP x21) bt Sorana Cirstea (ROM) 7-5, 6-4
Daria Kasatkina (RUS x26) bt Marketa Vondrousova (CZE) 7-6 (7/1), 6-4
Simona Halep (ROM x3) bt Tatjana Maria (GER) 6-4, 6-3
Hsieh Su-Wei (TPE) bt Taylor Townsend (USA) 6-0, 2-6, 6-3
Caroline Garcia (FRA x28) bt Chloe Paquet (FRA) 7-5, 6-4
Alize Cornet (FRA) bt Barbora Strycova (CZE x20) 6-4, 6-1
Agnieszka Radwanska (POL x9) bt Alison Van Uytvanck (BEL) 6-7 (3/7), 6-2, 6-3
Veronica Cepede (PAR) bt Anastasia Pavlyuchenkova (RUS x16) 7-6 (7/4), 2-6, 6-4
Mariana Duque (COL) bt Magdalena Rybarikova (SVK) 1-6, 6-3, 8-6
Carina Witthoeft (GER) bt Pauline Parmentier (FRA) 6-4, 7-6 (7/5)
Karolina Pliskova (CZE x2) bt Ekaterina Alexandrova (RUS) 6-2, 4-6, 6-3