Sam Cahill (Tobey Maguire) and Tommy Cahill (Jake Gyllenhaal) are brothers. A Marine captain about to embark on his fourth tour of duty, Sam is a steadfast family man married to his high school sweetheart, Grace (Natalie Portman), with whom he has two young daughters, Isabelle and Maggie (Bailee Madison, Taylor Grace Geare). The film opens with Tommy being released from jail for armed robbery, not long before Sam departs for Afghanistan in October, 2007.
Soon news comes that Sam's helicopter has crashed over the water, killing all of the Marines aboard. In reality, he and a hometown friend, Private Joe Willis (Patrick Flueger), have been taken prisoner in a mountain village. With Sam "gone", Tommy attempts to redeem himself in the eyes of his family by wrangling old friends to help with kitchen repairs for Grace and the kids. Grace slowly sheds her previous resentment towards her brother-in-law.
As months pass, Grace and Tommy bond over their mutual mourning, culminating in a passionate fireside kiss. They regret it afterward, and do not take this attraction any further, though Tommy continues to win the favor of his nieces. Meanwhile, Sam and Joe are abused and tortured by terrorists, forced to make videotaped dismissals of the military and their mission, though only Joe cracks. The captors eventually deem him useless and force Sam, at gunpoint, to beat Joe to death with a lead pipe. He does so and reacts angrily. Sometime later, Sam is rescued.
Sam returns home, clearly traumatized by his experience. He drifts through encounters in a cold, paranoid daze, refuses to explain to his family what happened while he was in Afghanistan, and lies to Joe's widow that he does not know how Joe died. He also believes Tommy and Grace had a sexual relationship in his absence. During Maggie's birthday party, a resentful and jealous Isabelle claims that Sam's paranoid assumptions are true: that Tommy and Grace slept together. Sam becomes enraged, destroying the newly remodeled kitchen with a crow bar and pulling a pistol on Tommy who arrives and tries to calm his brother's violent tantrum. The police arrive, and after a frantic confrontation in which Sam holds the gun up against his head and nearly commits suicide, Sam surrenders.
Sam is admitted to a mental hospital. Grace visits him and tells him that if he does not tell her what is tormenting him, he will lose her forever. Faced with this decision, Sam finally opens up about the source of his pain, confiding in her that he killed Joe and they embrace. A letter between husband and wife is read in voice over, with Sam wondering if he will be able to continue living a normal life.