Leonardo Dicaprio talked about the time he was almost eaten by a great white shark when he guest starred on The Ellen DeGeneres Show Tuesday.

The Wolf of Wall Street star spoke of a fundraiser he was a part of that helped protect endangered species -- such as sharks and tigers -- and their ecosystem.

DeGeneres pointed out how some people fear these animals mainly because they don't understand them.

"I think when people are afraid of anything, whatever it is, a person or an animal, when you don't understand it and you're afraid of it, we feel like we must destroy it," DeGeneres said. "And sharks are amazing creatures."

'Wolf of Wall Street' Breaks F-Bomb Record of Most Curses in One Film Since Spike Lee 1999 Hit

This led Dicaprio to tell the story of when he encountered a shark while scuba diving.

"I went scuba diving looking for sharks, and I had a huge fear of sharks," DiCaprio said. "And when I did 'Blood Diamond' in 2006, I actually got stuck in a cage with a great white, which was awesome."

When DeGeneres asked him how he survived the incident, DiCaprio simply said, "I don't know...I don't know."

"It was a gigantic great white," he added. "They actually said in 30 years this has never happened, but the tuna kind of got stuck on the top of the cage and the great white leapt out and tried to bite it and went into the cage with me."

'The Wolf of Wall Street' Review: A Story of American Greed & Lust Like It's Never Been Told Before

Dicaprio isn't involved with the fundraiser anymore, but he is happy with their work.

 "I don't want to do that anymore," he said about swimming with sharks. "But I don't want to discount their work because they're doing great stuff. But it was absolutely terrifying."