In the same event at London in 2012, Phelps took the gold medal and Lochte won silver.
Phelps was swimming the morning after winning the 20th and 21st gold medals of his career in the 200m butterfly and the 4x200m freestyle relay, in which Lochte won his sixth gold.
"Definitely fatigued a little bit," said Phelps, who told reporters he had got about five hours sleep. "My body hurt a little bit but with some good rest this afternoon I think I'll be fine."
The 31-year-old added: "I've been able to put my body through things like this over the years and hopefully I can keep it rolling one last time.
"Leaving everything in the pool one last time is what I'm going to do, and if that's good enough to win, we'll see."
Lochte, 32, said: "This week, we're just getting started. USA, we always show up when the time's right. Especially last night and the night before, just seeing USA just rocking and we're going to keep that really for the rest of the week."
There was plenty for Brazilian fans to celebrate, with Henrique Rodrigues qualifying fourth and Thiago Pereira fifth.
Pereira, swimming in the lane next to Phelps in their heat, excited the crowd by leading him over the butterfly, backstroke and breaststroke legs before the American pulled away with his long easy stroke in the freestyle.
Kosuke Hagino of Japan, who won the 400m individual medley on Saturday, was sixth out of 16 to make it through to the semis.
Ryan Lochte through his career
Ryan Lochte through his career
RIO DE JANEIRO, BRAZIL - AUGUST 12: Ryan Lochte of the United States attends a press conference in the Main Press Center on Day 7 of the Rio Olympics on August 12, 2016 in Rio de Janeiro, Brazil. (Photo by Matt Hazlett/Getty Images)
ATHENS, Greece: US Ryan Lochte poses on the podium after winning the men's 200m individual medley final, at the 2004 Olympic Games at the Olympic Aquatic Center in Athens, 19 August 2004. Lochte took the silver medal. AFP PHOTO FRANCOIS-XAVIER MARIT (Photo credit should read FRANCOIS XAVIER MARIT/AFP/Getty Images)
MONTREAL - JULY 29: (L-R) Markus Rogan of Austria wins the silver medal, Aaron Peirsol of the United States wins the gold medal and Ryan Lochte of the United States wins the bronze medal in the 200 meter Backstroke final during the XI FINA World Championships at the Parc Jean-Drapeau on July 29, 2005 in Montreal, Quebec, Canada. Peirsol set a new world record of 1:54.66. (Photo by Nick Laham/Getty Images)
SHANGHAI, CHINA - APRIL 09: Ryan Lochte of the USA celebrates winning gold and breaking the world record with USA team mate Jayme Cramer in the men's 200m backstroke final during day five of the FINA World Swimming Championships (25m) held at Qi Zhong Stadium on April 9, 2006 in Shanghai, China. (Photo by Chris McGrath/Getty Images)
WEST LAFAYETTE, IN - DECEMBER 01: World-Record Holder Ryan Lochte of Florida swims the Butterfly leg in the Men's 400M Individual Medley Prelim Heats during the 2006 U.S. Open of Swimming on December 1, 2006 at the Boilermaker Aquatics Center in West Lafayette, Indiana. (Photo by Donald Miralle/Getty Images)
MELBOURNE, AUSTRALIA - MARCH 29: Ryan Lochte of the USA poses with his silver medal following the Men's 200m Individual Medley Final during the XII FINA World Championships at the Rod Laver Arena on March 29, 2007 in Melbourne, Australia. (Photo by Al Bello/Getty Images)
MELBOURNE, AUSTRALIA - APRIL 01: Michael Phelps of the United States (L) celebrates victory and a new world record in the Men's 400m Individual Medley Final with second place Ryan Lochte of the United States during the XII FINA World Championships at the Rod Laver Arena on April 1, 2007 in Melbourne, Australia. (Photo by Al Bello/Getty Images)
NEW YORK CITY, NY - SEPTEMBER 10: Ryan Lochte attends THE CINEMA SOCIETY with CHANEL BEAUTE & VOGUE host the after party for 'THE DUCHESS' at Cooper Square Hotel on September 10, 2008 in New York City. (Photo by BiLLY FARRELL/Patrick McMullan via Getty Images)
BEIJING - AUGUST 13: Ryan Lochte of the United States finishes the Men's 200m Backstroke Heat 6 in first place held at the National Aquatics Center on Day 5 of the Beijing 2008 Olympic Games on August 13, 2008 in Beijing, China. (Photo by Adam Pretty/Getty Images)
' Ryan Lochte of USA displays his medal to the media photographers after receiving the Gold medal for the Men's 400m IM at the World Swimming Championships in Rome, Italy on Sunday, August 2, 2009. Photo Tim Clayton ' (Photo by Tim Clayton/Corbis via Getty Images)
Ryan Lochte attends Cocktails with a Cause benefitting Sophie's Voice Foundation at the Hearst Tower on September 14, 2009 in New York City. (Photo by Jim Spellman/WireImage)
LATE NIGHT WITH JIMMY FALLON -- Episode 690 -- Pictured: (l-r) Olympian Ryan Lochte during an interview with host Jimmy Fallon on August 24, 2012 -- (Photo by: Lloyd Bishop/NBC/NBCU Photo Bank via Getty Images)
TODAY -- Pictured: Ryan Lochte appears on NBC News' 'Today' show -- (Photo by: Peter Kramer/NBC/NBC NewsWire via Getty Images)
US swimmer Ryan Lochte reacts after he competed in the final of the men's 200-metre individual medley swimming event in the FINA World Championships at the indoor stadium of the Oriental Sports Center in Shanghai on July 28, 2011. Lochte won the men's 200m individual medley in world record time, beating team-mate Michael Phelps. Lochte lowered his own record by one tenth of a second to 1min 54.00sec. AFP PHOTO / PETER PARKS (Photo credit should read PETER PARKS/AFP/Getty Images)
SHANGHAI, CHINA - JULY 28: Ryan Lochte of the United States poses with his gold medal after winning in a new world record time the Men's 200m Individual Medley Final during Day Thirteen of the 14th FINA World Championships at the Oriental Sports Center on July 28, 2011 in Shanghai, China. (Photo by Ezra Shaw/Getty Images)
ISTANBUL, TURKEY - DECEMBER 16: Ryan Lochte of USA reacts after swimming the last leg on the Men's 4x100m Medely Relay during day five of the 11th FINA Short Course World Championships at the Sinan Erdem Dome on December 16, 2012 in Istanbul, Turkey. (Photo by Ian MacNicol/Getty Images)
US swimmer Michael Phelps (C) poses on the podium with the gold medal flanked by silver medalist US swimmer Ryan Lochte (R) and bronze medalist Hungary's Laszlo Cseh (L) after winning the men's 200m individual medley swimming event at the London 2012 Olympic Games on August 2, 2012 in London. AFP PHOTO / FABRICE COFFRINI (Photo credit should read FABRICE COFFRINI/AFP/GettyImages)
LAS VEGAS, NV - SEPTEMBER 21: Swimmer Ryan Lochte (L) and singer Miley Cyrus speak onstage during the 2012 iHeartRadio Music Festival at the MGM Grand Garden Arena on September 21, 2012 in Las Vegas, Nevada. (Photo by Isaac Brekken/Getty Images for Clear Channel)
Gold medalist US swimmer Ryan Lochte (C), silver medalist Japan's Kosuke Hagino (L) and bronze medalist Brazil's Thiago Pereira pose on the podium during the award ceremony of the men's 200-metre individual medley swimming event in the FINA World Championships at Palau Sant Jordi in Barcelona on August 1, 2013. AFP PHOTO / FABRICE COFFRINI (Photo credit should read FABRICE COFFRINI/AFP/Getty Images)
DOHA, QATAR - DECEMBER 06: Ryan Lochte of USA looks on after the Men's 100m Individual Medley heats on day four of the 12th FINA World Swimming Championships (25m) at the Hamad Aquatic Centre on December 6, 2014 in Doha, Qatar (Photo by Clive Rose/Getty Images)
LOS ANGELES, CA - NOVEMBER 22: Ryan Lochte attends the 2015 USA Swimming Golden Goggle Awards at J.W. Marriot at L.A. Live on November 22, 2015 in Los Angeles, California. (Photo by Joe Scarnici/Getty Images)
RIO DE JANEIRO, BRAZIL - AUGUST 11, 2016: Michael Phelps (L) and Ryan Lochte of the United States look on after the men's 200m individual medley final at the Rio 2016 Summer Olympic Games, at the Olympic Aquatics Stadium. It is 22nd Olympic gold for Phelps. Stanislav Krasilnikov/TASS (Photo by Stanislav Krasilnikov\TASS via Getty Images)
RIO DE JANEIRO, BRAZIL - AUGUST 9: Michael Phelps, Ryan Lochte, Conor Dwyer, Francis Haas (hidden) of Team USA celebrate winning the gold medal during the medal ceremony of the men's 200m freestyle relay on day 4 of the Rio 2016 Olympic Games at Olympic Aquatics Stadium on August 9, 2016 in Rio de Janeiro, Brazil. (Photo by Jean Catuffe/Getty Images)
DANCING WITH THE STARS - 'Episode 2306' - The nine remaining celebrities ready themselves for one of the hottest nights in the ballroom - Latin Night - with each celebrity performing either a rumba, salsa, samba, paso doblï¿½ cha cha or Argentine tango, on 'Dancing with the Stars,' live, MONDAY, OCTOBER 17 (8:00-10:01 p.m. EDT), on the ABC Television Network. (Eric McCandless/ABC via Getty Images)
RYAN LOCHTE, CHERYL BURKE