Crowds lined Tower Bridge and Butler's Wharf to watch Spain's Sergio Garcia and the USA's Dustin Johnson tee off from a Thames barge on Monday evening.
The stunt was staged by Olympic sponsors Adidas to mark the return of golf to the games in 2016.
Along with Mark King, chief executive of club manufacturer TaylorMade Golf, the duo were competing in a charity challenge to hit the ball to a green on another barge positioned just off Tower Bridge.
Adidas offered the players £1,200 for charity if they managed to land the ball on the green and £12,000 if they got a hole in one.
Between them the three golfers managed to hit the green with eight out of 15 attempts, raising a total of £9,600 for International Inspiration, the British Olympic Association and British Paralympic Association's international legacy programme.
Eight years ago John McEnroe and Monica Seles played tennis on a Thames barge.
For the latest local news and events direct to your inbox every Monday, you need our weekly email newsletter SE1 Direct.
7,000+ locals read it every week. Can you afford to miss out?
Read the latest issue before signing up