The momentous putt by Phelps, who is an average amateur golfer with a 16 handicap, came during the second round of team play at the Dunhill Links Championship at the Kingsbarn Golf Links in St. Andrew's.
Phelps, who won 22 medals, including 18 gold, in three Olympics, had driven to the front edge of the green on the par-four sixth hole.
"That was the longest putt I've ever holed," said Phelps, who with his handicap was able to record a 1 for the hole. "It was pretty incredible, watching it dive in was a pretty cool feeling. So to be able to have a net hole-in-one was pretty special.
"Even without that, this trip would have been very special, just having the opportunity to come over here and play among some of these players has been absolutely incredible."