Paul Haggis' In The Valley of Elah is based on actual events, with themes including the Iraq war, abuse of prisoners, Post-Traumatic Stress Disorder following active combat, family, the military's disregard for the mental well-being of soldiers, and portrays a father's hunt for his son's killers.
Hank Deerfield (Tommy Lee Jones) is a retired army military police sergeant with experience investigating crimes. He learns that his son Mike (Jonathan Tucker) has returned to America and has gone AWOL. Hank leaves, hoping to find his son.
Though hurrying to the army base, Hank takes the time to stop at the local school, where the United States Flag has mistakenly been hung upside down. Explaining to the school custodian, an immigrant from El Salvador (whose civil flag is a simple blue-white-blue tricolor so doesn't need to be oriented before raising on a pole) that a flag hanging upside down is an international sign of great distress, he helps the caretaker fix the flag before continuing on his way.
Upon reaching the base, Hank meets with army personnel; all of them express their condolences, but are largely unhelpful. Although he talks to a few people who knew Mike, he is unable to find any useful information. Faced with this apparent stonewalling, Hank steals Mike's phone from his room and has it analyzed by a local computer expert; the phone's memory has been damaged by heat, but the expert offers to try and recover the video clips from the phone, a process that will take some days. Hank pays the man $100 and awaits his reply by e-mail.
With most of his early investigations fruitless, Hank approaches the local police. He sees Detective Emily Sanders (Charlize Theron) dismiss a woman's concerns after her recently-returned husband (a veteran of the war) drowned their dog in the bathtub, in front of their son. The woman is worried about how disturbed he may be, but Sanders tells her that there is nothing she can legally do regarding the death of the dog, and sends the woman away, doing nothing to allay the wife's concerns. Later in the film Sanders is called to the woman's house; her husband has drowned her in the bathtub while their son was at his grandmother's house.
Hank finds little help from Det. Sanders and heads to a diner where he meets an old friend from Army CID, Arnold Bickman (Barry Corbin) whom he has not seen in over fifteen years. Hank asks Arnold if any of their crowd is left on the base to which Arnold says that they are all gone. This is a pivotal remark because it subtly alludes to the fact that times have changed and the military, as well as the struggles of individual soldiers have also evolved. Asked about his oldest son, Hank informs him that he died serving in the 82nd Airborne in a helicopter crash while on maneuvers ten years ago. When asked about Mike, Hank evades talking about Mike directly. Hank returns to his motel room to find the first imperfect videos dredged from Mike's phone.
Meanwhile, the police are seen investigating a crime scene of a dismembered and burnt body. The police are very pleased to pass the investigation off to the military because the murder seemingly happened on land owned by the military; however, the conflict between civilian police and military personnel is clearly exemplified.
Hank Deerfield is notified at his hotel room that the remains of his son Mike have been found. The officer is reluctant to offer more information but at Deerfield's insistence, he takes him to see his son's burnt and virtually unrecognizable remains (the officer mentions that they were only able to identify Mike Deerfield from partial fingerprints).
Det. Sanders is reluctant to pass the crime off to the military, but is left with little choice. In the morgue, Lt. Kirklander (Jason Patric) showed Hank his son's remains and then asked if Mike did drugs because they suspect that he may have been murdered by a gang of Mexicans involved in smuggling heroin in from the Middle East. A pipe was found under Mike's mattress which Lt. Kirklander says he will not include in his report.
Faced with Hank's determination, Detective Sanders is forced to take Hank to the crime scene. He is able to find that the location of the killing occurred outside of military property by locating markings on the ground from where the body was dragged. Also, Detective Sanders mentions a green car that witnesses saw at the crime scene, but Hank points out that the car was most likely blue, as it would just appear green from a under the yellow street lamps.
Hank notifies his wife Joan (Susan Sarandon) over the phone of Mike's death. Joan is devastated and angry at losing two sons in the military. She tells Hank that he left Mike with little choice and that the young man would not have felt at all like a man if he hadn't joined the army.
After putting her young son to bed, Det. Sanders looks over grisly crime scene photos while Hank examines video from Mike's phone; the videos are very fragmented. At work, Det. Sanders is given bad assignments mocking her expertise, and the men in the force clearly believe that she slept her way into her job. Whether or not she slept with him, she does have some pull with the chief (Josh Brolin) who allows her to pursue the case, even though the additional unsolved murder cases reflect badly on him.
Hank and Det. Sanders continue to work together solving the case, and keep finding dead ends and twists and turns along the way. At first, they suspect Private Robert Ortiez, a Mexican-American soldier who may be involved in drugs. With the support of some narcotics officers, Sanders leads the police to Ortiez's residence to apprehend him, but Ortiez flees on foot with the cops in ineffectual pursuit. Having followed the police against Sander's objections, a frustrated Hank chases Ortiez down in the street, hits him with the open door of his truck and brutally assaults him. When Det. Sanders tries to pull the frenzied Hank off Ortiez, Hank accidentally hits her as well. No charges are filed, but Sanders is furious with Hank's intervention and loss of control.
In interviewing the soldiers with whom Mike was out on the night when he died, Hank and Sanders find inconsistencies in their testimonies. The men had gone out to a fast food restaurant that night, but had ordered only enough for three, despite their claims that the group had numbered four people. Discrepancies in the signatures on Mike's credit slips provide further evidence that the men are not telling the truth. After one of the men commits suicide, it is interpreted by the military as the closest that they will get to a confession. Hank and Emily are not satisfied.
In the meantime Hank gets the last video from the mobile over email which shows Mike torturing a prisoner in the back of a Humvee military vehicle. The full story of the night eventually emerges when Penning confesses in front of Hank and Emily. Mike and the men had gotten kicked out of a strip club after Mike became agitated and caused a disturbance. Afterwards, fighting between the men escalated, and as a possible by-product of Post-Traumatic Stress Disorder, one of his fellow soldiers stabbed him over forty times. Another had the idea of dismembering and burning the body. Hungry, the men then went to eat. Penning also reveals that Mike used to torture prisoners and that's how he got the nickname "Doc."
Hank Deerfield apologizes to Ortiez for the beating when he finds that Ortiez was not responsible. After the two speak, Hank finds that Mike had struck and killed a child with his Humvee in Iraq due to a standing order to keep driving even if something or someone is in their way. This caused psychological problems for Mike, who had made an agitated phone call to his father after the event. Hank had thought that his son was only experiencing typical emotions associated with a tour of duty; he provides no words of comfort to his son and is only worried about Mike crying in front of other soldiers. Mike realizes he will not receive words of comfort or wisdom, and he ends his phone call with his father knowing he will have to find his own way to cope with the horrors of war.
With the crime finally solved and the men from Mike's squadron revealed as his killers, Hank returns home to find a flag his son had mailed from overseas, along with a picture of it flying over his squad in Iraq. His faith shattered, Hank takes the flag to the school and hoists it upside down: a sign that everything is not all right and the country is in distress. He duct tapes the ropes of the flag staff and instructs the school's custodian to leave it like that, even at night.
The film stresses not only the failings of the military to adequately look out for the well-being of its soldiers, but the failings of a father whose connection to his military past slowly unravels as the film progresses.