Phelps was part of a pro-am team with Paul Casey at the European Tour's Alfred Dunhill Championship when he reached the green at the par-4, 337-yard No. 6 hole at Kingsbarns with his drive.
He lined up a putt from the front edge that Casey's caddie estimated to be 159 feet from the cup. Television replays of the putt show it took 17 seconds from the time Phelps struck the ball until it dropped into the hole.
Given Phelps' handicap, the putt was the same as a hole-in-one.
European Tour officials said it is believed to be the longest putt made on television.
"A 50-yard putt!" Phelps said. "That was the longest putt I've ever holed so it was pretty incredible and watching it die in was a cool feeling.
"To be able to have a net hole-in-one was special but even without that this trip has been even more special. Just having the opportunity to come over here and play among these players on these courses is incredible."
Phelps and Casey are well back, however, in the pro-am. They are at 9-under 135 while the pair of Hugh Connerty Jr. and Thongchai Jaidee lead at 21-under.
Phelps won four gold and two silver medals at the 2012 Olympics. He owns the most Olympic medals of any athletes, with 22 (18 gold) won over three Olympics Games.