In a field packed with the world's best, Walsh threw 21.23m in the first round and didn't relinquish the lead until eventual winner Reese Hoffa threw 21.67m in the third round.
World champion David Storl moved past Walsh with 21.26m in the fourth round and 21.38m in the fifth.
To put Walsh's achievement further in perspective: Joe Kovacs, whose 22.03m throw is the leading distance this year, was fourth, double Olympic champion Tomasz Majewski was fifth, and Ryan Whiting, winner of the last two world indoor titles, was eighth. No other Commonwealth Games eligible athletes were in the field.
The effort was Walsh's longest outdoor throw, 3cm short of his indoor best when he earned bronze at the world championships in March.
"It's given me great confidence leading into the next two to three weeks of competition, including the Commonwealth Games," Walsh said.
"To match it with the big boys on more than a one-off occasion is great for my mental state.
"I didn't expect to throw 21.23m, especially in the first round. I would have been happy with anything over the 20.50m mark.
"When someone drops a bomb like that first up, others start doing things they usually wouldn't. I think they were a wee bit shocked, especially coming from me."
The meet doubled as a chance for the 22-year-old to observe the Glasgow Commonwealth Games throwing circle and Hampden Park stadium where he will compete on July 28. Some correspondence from one of his builder mates ensured Walsh stayed grounded beforehand.
"I found a Facebook photo which came with the words 'tag a mate who thinks he's big', so that brought me down to Earth," he chuckled.
Walsh has completed a heavy training load over the last three weeks which has included working with Val Adams and her coach Jean-Pierre Egger in Switzerland.
"I was mainly building on the preparation I've done at home but also using JP's eye to tell me if he saw anything really bad. Val also kept me down-to-Earth by giving me a bit of lip. It was great to have their support."
Walsh's next competition will be in the Czech Republic on July 16 before he joins Athletics New Zealand's Commonwealth Games build-up camp in Cardiff.