Although it was just a semi-final, the pair showed why they have one of the greatest rivalries in sport, battling each other stroke for stroke over the last lap.
Lochte, who beat Phelps in the 400m individual medley final on Monday night, got his hand on the wall first in one minute 46.25 seconds, but Phelps was just 0.02 seconds away.
The pair will clash again in the final on Wednesday with the top two finishers qualifying for the Olympics where they are expected to square off in at least three races before teaming up in the U.S. relays.
Another six swimmers booked their place in the powerful U.S. team on Tuesday after another exhilarating night of finals in America's midwest.
Brendan Hansen, who came out of retirement for what he called "unfinished business", qualified for his third Olympics when he won the 100m breaststroke final in 59.68, just ahead of cancer survivor Eric Shanteau.
Dana Vollmer ended 12 years of frustration when she won the women's 100m butterfly final to book her first individual Olympic berth.
Although Vollmer competed at the 2004 Olympics in Athens and won a relay gold medal, the now 24-year-old had never qualified in an individual despite three previous attempts, including her first when she was just 12.
On Tuesday, however, she made up for past near-misses when she led from start to finish to win in 56.50 seconds, less than half a second outside the world record set by Sweden's Sarah Sjoestroem at the 2009 world championships in Rome.
Claire Donahue, swimming from the outside lane, sliced a quarter of a second off her best time to finish second in 57.57 and qualify for her first Olympics.
Allison Schmitt, a team mate of Phelps in Baltimore, won the women's 400m freestyle in 4:02.84 ahead of the fast-finishing Chloe Sutton after Katie Hoff and Janet Evans both failed to make the final.
Hoff, the 2008 Olympic silver medallist, could manage only 20th place in the heats while Evans, the 1988 Olympic champion making a comeback "for fun" at age 40, was 80th overall.
Missy Franklin, the emerging star of the American women's team, set the fastest time in the 100m backstroke semis in a dazzling start to the first of her five events.
Natalie Coughlin, who won the 100m backstroke at the past two Olympics, only snuck into the final in seventh while Amanda Beard, bidding to make her fifth Olympic team, missed a place in the 100m breaststroke final where world champion Rebecca Soni set the fastest time ahead of world record holder Jessica Hardy.