Therouxpt2060712_15_X17crop.jpgJustin Theroux has booked a new gig as director of Swear To God ... an upcoming comedy starring Will Ferrell and Steve Carell, according to

Theroux will also rewrite the film's current script.

IMDB describes the movie as follows: "Ferrell will play a narcissistic hedge fund manager who thinks he has seen God."

Jennifer Aniston's beau also recently scripted Tropic Thunder and Zoolander 2.

Will Ferrell will begin filming Swear To God once he wraps the Anchorman sequel.