Shooting begins later this month.
The story centers on Diaz as a middle-school teacher who, after being dumped by her boyfriend, vies with a rival who is dating the school's model instructor. The latter part will be played by Timberlake. Segel plays a gym teacher, and John Michael Higgins is slotted as the principal.
Though Timberlake's casting as the male lead may seem awkward given his and Diaz' former relationship, Variety says the studio was eager to work with the singer-actor again after seeing his performance in David Fincher's upcoming The Social Network.
Jake Kasdan is directing Bad Teacher from a screenplay by Lee Eisenberg and Gene Stupnitsky. Jimmy Miller is producing.