The actor filmed the movie 'Shotgun Wedding' with the actress in the Dominican Republic.
The 48-year-old actor opened up about a scary experience he had during a break from filming in the tropical location on Wednesday's The Tonight Show Starring Jimmy Fallon.
"It was one of the near-death experiences of my life for sure," Duhamel said, sharing cell phone footage he took at the cove near where he was staying.
The actor held the camera as a giant wave came crashing into him, washing over the phone and throwing him back.
"I can laugh about it now, and you're the first person I've shown that to because if I'd have shown that to Lionsgate while we were shooting it they would have, I don't know, they probably would have kicked me off the movie," Duhamel told Fallon.
It wasn't just his time off from shooting that was grueling. In the film, Duhamel plays groom Tom whose destination wedding to his bride Darcy (Lopez) is taken over by criminals.
"I just crawl out of a river half the time in this movie," he joked. "I'm completely soaked and sweaty and she's just gorgeous throughout the movie, so I'm not sure we're going to look like the perfect couple half the time because I'm this sweaty mess and she's J.Lo."
Duhamel landed the role after Armie Hammer stepped down amid his ongoing scandal. He shared that his history with Lopez made the on-screen chemistry easy.
"She's fantastic. I've known her for years and it came to my attention that the job became available and I got a chance to meet with her and it was like rekindling an old friendship with an old friend," he shared.
Duhamel previously opened up to ET about shooting the movie.
"It was one of the most fun experiences I've had shooting, or working in this business," he said. "First of all, we're in the Dominican Republic, which is absolutely beautiful. Jen was a dream to work with, she's an absolute pro and totally engaged and loved the project."