Bad Teacher - in the works at CBS - is based on the 2011 Cameron Diaz film of the same name.
Ari Graynor (Fringe) will play the title role of Meredith Davis, a sassy and foul-mouthed teacher on the lookout for a new husband.
Davis will play Meredith's nemesis, history teacher Ginny, according to TVLine.
The 48-year-old actress is best known for playing Charlotte on HBO's Sex and the City and its big-screen spinoffs.
She also starred in the original Melrose Place and has appeared in episodes of Friends, Seinfeld and Will & Grace.
Davis joins the previously-cast Sara Gilbert (Roseanne) and Ryan Hansen (Veronica Mars) in the CBS Bad Teacher pilot, which has been penned by writer Hilary Winston (Community, Happy Endings).
> Cynthia Nixon: 'I think it's fine to let Sex and the City go'
US TV's most exciting pilots - in pictures:
Copyright: Ian West/PA Archive/Press Association Images