The winner of the event, Tom Shields of Huntington Beach, finished with a personal-best time of 51.29 seconds. Phelps finished just a fingertip behind with a time of 51.30, a little less than two seconds off his personal best.
"To be honest, that's just where I am," said Phelps, 29, who has competed in four Olympics and holds Olympic records with 18 gold medals and 22 overall. "If I want to go better, I need more. I need more training, I need more endurance, and I need to feel a lot more comfort with my stroke. There are just a lot more things that need to happen."
He later added: "There are things like this that help me and motivate me more than anything else. I'm somebody who can't stand to lose, I don't care if it's by a hundredth or by five seconds. . . . This will be something that sticks with me for the next year, hopefully leading up to the world championships."
Phelps, who is known for his closing ability, had the second-worst time at the 50-meter turn. He got close to catching Shields in the finishing stretch, but missed by the smallest of margins.
Shields, a 23-year-old butterfly specialist, is no slouch; he won three medals at the 2012 world championships. But he has never competed in an Olympics, which could be why, during a television interview after the race, Shields said, "I was so stoked to be racing in between Ryan and Michael. I grew up watching those guys. I worshipped them."
During the prelims earlier in the day, Phelps swam the fastest time in the world this year, 51.17. It was also a faster time than he swam to qualify for the 2012 London Olympics. After Friday night's race, his coach, Bob Bowman, said that this was the best Phelps has looked "by far" since he announced his comeback.
Phelps finished seventh in the 100-meter freestyle Thursday, but the freestyle isn't his specialty. It was an event in which he could succeed because of the training he did for other events, but after taking time off from training, he no longer has that luxury.
The 100-meter fly, however, has been one of Phelps' strongest events in the past. He's won three Olympic gold medals in it, and the 49.82 he clocked in 2009 is still the world record. Earlier this week, Phelps said his 100 fly feels the same as it did before his brief retirement, and Bowman said it looks the same — all good signs for Friday's race.
"This has kind of been my kind of event," Phelps said after the prelim heat, "the event I love swimming the most."
This was Phelps' fifth race since returning to competitive swimming. He needed to finish first to guarantee a trip to the Pan Pacific Championships later this month in Australia, though he'll probably still earn a spot. Neither that event nor this one has anything to do with qualifying for the 2016
After the final, Bowman said he thought Phelps was nervous about qualifying for the Pan Pacifics, estimating that his pupil hadn't felt this shaky about qualifying for a team since the 2000 Sydney Olympics, his first.
According to Bowman, Phelps was nervous about how his preparation would translate after taking a year off from swimming,
Phelps later said he felt "out of it," mostly because he's not used to being in this kind of shape heading into a final.
"It's not fitness, but it's the knowledge that he's getting up against these guys who are on fire, and he knows what he's done to get here," Bowman said. "And it ain't what he used to do to get here. I'm pretty sure that's a factor."
Earlier in the week, both Bowman and Phelps said Phelps' performance at nationals would determine their plans for the next Olympic cycle.
With a good result and more time to train, consider an Olympic berth a little more realistic after Friday, if only by a fingertip.
In the 400-meter medley, arguably the most arduous event at nationals, Tyler Clary of Riverside won the men's competition in 4 minutes 9.51 seconds, the second-fastest time in the world this year.
Kendyl Stewart of Carlsbad won the women's 100-meter butterfly in 57.98, a day after winning the 50 fly.
David Plummer of Oklahoma City won the men's 50-meter backstroke in 24.82; Rachel Bootsma of Eden Prairie, Minn., won the women's final in 28.35.