Science fiction writer David (JOHN CUSACK) has writer's block and a pressing contract for a sequel to his very popular previous novel. Still mourning the two-years-ago death of his beautiful wife, David contemplates fulfilling a dream she had, to adopt a child. Though he's uncertain, when he's introduced to six-year-old Dennis (BOBBY COLEMAN) by a social worker named Sophie (SOPHIE OKONEDO), David is moved by the boy's trauma-induced delusion: he thinks he's from Mars. When David is able to coax Dennis out of the big cardboard box where he stays out the sunlight, it appears these two damaged souls can work their way towards a mutual understanding.
David is cautioned against this adventure repeatedly, first by his delightful sister Liz (JOAN CUSACK), who appears perpetually harried by her own sons, and muttering Dr. Lefkowitz (RICHARD SCHIFF), an adoption board member who has doubts that a single man should be adopting at all. At the same time, David finds encouragement and incipient romance with the fiancée's best friend, Harlee (AMANDA PEET). They share sweet memories of their previous, happy times, and serve as equally patient parental figures for the decidedly difficult Dennis.
The family tensions increase erratically. Some days are happy (Dennis hits a softball) and others are sad (David's dog dies, upsetting Dennis and David and initiating a talk about death and abandonment suitable for a six-year-old). Dennis is also in trouble at school, because he not only hangs upside down from the jungle gym but also steals the other kids' belongings for what he calls "study" of human behavior.
David has problems even apart from Dennis. Pressured by his agent Jeff (OLIVER PLATT) and publisher Tina (ANJELICA HUSTON), David eventually has to come up with a manuscript. When they learn it is not the promised sequel but a book about parenting, both are very upset. Eventually, David will need to bring together the sad and happy parts of his life, share them with Dennis and teach the boy to trust in a father who will not leave him.