Focus Features and Misher Films are teaming on the project. Wayfare Entertainment is financing and producing.
The film is based on Ned Vizzini's young-adult novel about a teenage boy who, after a bout of depression, is sent to a mental institution, where he ends up in the adult ward and meets a number of offbeat adults as well as a quirky teenage girl.
Galifianakis would play one of the main adult roles. Roberts would star as the teenage love interest.
Since his big breakout this summer in The Hangover, Galifianakis has taken on roles in a number of comedies, but Story would represent a meatier part with dramatic elements, THR says.