Now this is what Halloween's all about!

Josh Duhamel appears on the "Ellen DeGeneres Show" on Friday -- dressed as Lloyd Christmas from "Dumb and Dumber," no less -- where Ellen, who's rocking a "Karla Kardashian" costume, plans the ultimate prank during the interview.

Josh was chatting about his new flick, "Lost in the Sun," when a man dressed as a "Fergie impersonator" jumps out from a box planted behind the sexy star. "AH! You son of a b--ch!" Josh screams in the clip, while leaping from his chair.

Duhamel wasn't the only actor getting in on the Halloween fun on Friday's episode with Ellen -- the comedienne also sent her executive producer and "Modern Family" star Eric Stonestreet through a haunted house ... and filmed the entire thing. Check out the video below to see the clip!

While making their way through the maze, a man wearing a Michael Myers mask jumps out from a closet door.

"Jiminy Christmas" Stonestreet shouts in the clip. "I'm telling you, he's the worst," Eric adds.

Needless to say, the entire experience definitely scared the hilarious star!

1030_josh_insetLaunch GalleryMichael Rozman/Warner Bros2015 Halloween Costumes

Which scare is your favorite from the show? Test your horror movie trivia below!