Phelps, the most decorated Olympian of all time, inspired the United States to victory in the 4x100m freestyle relay before he starts his personal campaign on Monday.
The Olympic swimming battle will also see Russia’s Yuliya Efimova, retrieved from a drug ban, in contention for a medal.
The 31-year-old Phelps — who has now won 19 gold medals — roared with delight and hugged his team-mates after they came home ahead of defending champions France in silver, with Australia third.
It was a fairytale moment for Phelps, who came out of retirement for one last crack at the Olympics.
He will be in the 200m butterfly heats on Monday having seen the relay display cap a superb night of swimming with three world records broken.
Katie Ledecky obliterated her own world best in the 400m freestyle on her way to gold.
The 19-year-old touched the wall in 3min 56.46sec, taking nearly two seconds off her previous record.
Ledecky is bidding to become the first Olympian since Debbie Meyer in 1968 to win the 200m, 400m and 800m free in the same Games.
‘It’s surreal, crazy’
Britain’s Adam Peaty took more than 1.5sec off the men’s 100m breaststroke world record after Sweden’s Sarah Sjostrom had also broken the record in the women’s race.
“It’s surreal. It was crazy. It’s amazing and I probably won’t be able to sleep tonight,” Peaty said.
The spellbinding action in the pool brought the curtain down on an intense day of sport with 14 gold medals shared out.
Among the most popular winners was the hard-as-nails judoka Majlinda Kelmendi from Kosovo, taking part in its first Games after only gaining Olympic status in 2014.
The 25-year-old sank to her knees in tears after out-grappling Italy’s Odette Giuffrida to win by yuko in the women’s 52kg final.
Kosovo is the 100th country to win an Olympic gold medal.
“I have always wanted to show the world that Kosovo is not just a country that has gone through war,” Kelmendi beamed.
“We have survived a war. There are still kids who don’t know if their parents are alive, don’t have anything to eat or books to go to school. So the fact of becoming Olympic champion is just huge for all of us.”
The day began with strong winds wreaking havoc at several Olympic venues.
The entire day of rowing was called off after gusts churned waters making it impossible to row. Strong winds also delayed the tennis, which saw a slew of upsets when action resumed.
The biggest casualty was world number one Novak Djokovic, bounced out 7-6 (7/4), 7-6 (7/2) in the opening round of the men’s singles by Argentina’s Juan Martin del Potro.
It was an unexpected win for del Potro, who has struggled with wrist injuries in recent years.
“It was an amazing match for me. I didn’t expect to win tonight as I know the situation with my wrist,” said del Potro.
In the women’s doubles, Venus and Serena Williams’ long reign as champions came to an end when they lost to Czech duo Lucie Safarova and Barbora Strycova in the first round.
“It was what it was. We have a chance to compete for our country and did the best that we can. We had a blast out there,” said 34-year-old Serena after the 6-3, 6-4 defeat.
The women’s cycling road race was won by Anna van der Breggen, who overcame the shock of seeing team-mate Annemiek van Vleuten lying stricken on the road after a horrific crash to win gold on Copacabana beach.
Van Vleuten was taken to intensive care with cracked vertebrae.
There was more disappointment for hosts Brazil in the Olympic football. They were booed off for a second straight game after a 0-0 draw with Iraq.