Megan Fox will replace Zooey Deschanel on 'New Girl'.

Zooey - who welcomed her first child with husband Jacob Pechenik in August - is taking time off to spend with her baby daughter and Megan will join the show in her absence.

However, Zooey's break is only temporary and she will be back.

Megan's character Reagan is described as ''a gorgeous, straight-shooting pharmaceutical sales rep who comes to town on business and shakes things up when she rents out Jess' (Zooey) room while she is sequestered on jury duty''.

New Girl executive producer Liz Meriwether commented: ''It's insane to me that such a gorgeous person can be so funny, but I guess we just all have to accept it.

''I've been a fan of her comedic skills since 'This Is 40', and I'm so excited to have her on the show. We had Megan in mind when we wrote this part - she's the perfect person to come in and shake these guys up.''

The casting is some good news for Megan, who recently filed for divorce from Brian Austin Green, 42, after five years of marriage.

The 'Teenage Mutant Ninja Turtles' star is seeking joint physical and legal custody of their two sons, Noah, two, and Bodhi, 18 months.

According to court documents, the 29-year-old beauty hired celebrity lawyer Laura Wasser to represent her and she cited ''irreconcilable differences'' as the reason for the petition.

Megan also listed June 15, 2015 as the official date of their separation despite recent speculation they quietly split six months ago.