While filming in the Dominican Republic for the romantic comedy, in which the actor stars opposite Jennifer Lopez, Duhamel said the "calm, turquoise" cove he revisited was replaced with "tumultuous" waves.
"The waves were crashing like 30 feet in the air," he said during a Wednesday appearance on "The Tonight Show Starring Jimmy Fallon," adding that he filmed the whole experience. "This rogue wave comes up as I'm video taping this thing and literally washed me almost over the edge of this cliff."
He said he was thankful for the "razor-sharp coral" on the cliff that kept him grounded, but that same coral scarred him up pretty badly.
"It was one of the near-death experiences of my life, for sure," he said before showing the cellphone footage he got before his fall.
Duhamel told Fallon that he was one of the first people to see the clip.
He added: "If I would've shown it to (production company) Lionsgate while we were shooting it, they probably would've kicked me off the movie."
The film already lost one actor to play the character of Tom: Armie Hammer was originally cast to play the role that eventually went to Duhamel, but was replaced in the wake of of multiple abuse allegations, including accusations of rape that are being investigated by Los Angeles police.
Lionsgate, the studio producing the upcoming comedy, announced the casting update in a February press release.
"We couldn’t be happier for our bride and groom of this 'Shotgun Wedding,' " Erin Westerman, the president of production for the Lionsgate Motion Pictures Group, said in a statement. “We know Josh and Jennifer will make a compelling and sexy on-screen couple and they will be fun sparring partners as their dream destination wedding erupts into a memorable nightmare."
Duhamel, who has previously acted in the "Transformers" franchise and "Love, Simon," also stars in the upcoming Netflix superhero drama series "Jupiter's Legacy."
Contributing: Charles Trepany
This article originally appeared on USA TODAY: Josh Duhamel shares scary 'Shotgun Wedding' on-location moment