Credit: Matt Sayles/AP

Thanks to a little bit of magic, Dan Castellaneta, aka the voice of Homer Simpson, will pop up on Baby Daddy.

The Simpsons star is guest-starring in an episode of the ABC Family comedy, the network has confirmed. He’ll play a magician at a not-so-hot hotel in Las Vegas, and when he puts Bonnie (Melissa Peterman) into handcuffs, the trick is no treat for her.

This marks a return to ABC Family for Castellaneta, who had a recurring role on Greek. He has also recently appeared on such shows as The League, Hot in Cleveland, and The Mindy Project.

Baby Daddy airs its midseason finale on Mar. 18 and returns later this year for the second half of season 4, which contains Castellaneta’s episode.

The Wrap first reported the news.