Jesse Eisenberg is set to star in the title role of the upcoming FX on Hulu limited series “Fleishman Is in Trouble.”

Eisenberg joins previously announced cast member Lizzy Caplan. The role reunites the pair, as they previously starred together in the film “Now You See Me 2.”

Based on the Taffy Brodesser-Akner novel of the same name, the nine-episode series centers on Toby Fleishman, who dives into the brave new world of app-based dating with the kind of success he never had dating in his youth, before he got married at the tail-end of medical school.

But just at the start of his first summer of sexual freedom, his ex-wife, Rachel, disappears, leaving him with the kids and no hint of where she is or whether she plans to return. As he balances parenting, the return of old friends, a promotion at the hospital that is a long time coming, and all the eligible women that Manhattan has to offer, he realizes that he’ll never be able to figure out what happened to Rachel until he can take a more honest look at what happened to their marriage in the first place.

Caplan will star as Libby, the show’s narrator and Toby’s friend. Libby and Toby had lost touch for years, but following his divorce, they’ve recently reconnected and rekindled their friendship. She used to work for a men’s magazine, but has since stopped writing and is now a full-time stay-at-home mother.

This role will mark one of few TV roles Eisenberg has had in his career. He is known for his film work, having been nominated for the Academy Award for best actor for his work in “The Social Network” in 2011. He has also starred in hits like “Zombieland” and its recent sequel, “The Squid and the Whale,” “The End of the Tour,” the “Now You See Me” films, and “Batman v. Superman,” in which he played the iconic role of Lex Luthor. He will make his directorial debut with the upcoming feature “When You Finish Saving the World.”

He is repped by CAA, Viewpoint and Felker Toczek

Brodesser-Akner is adapting the book for the screen and will also serve as an executive producer. Sarah Timberman, Carl Beverly, Susannah Grant, Jonathan Dayton, and Valerie Faris also executive produce. Dayton and Faris will direct the first block of episodes as well. ABC Signature is the studio.