The film starts on July 4, 1969, with the Zodiac killers second attack, the shooting of Darlene Ferrin and Mike Mageau at a lovers' lane in Vallejo. Mageau survives while Ferrin dies from her injuries. One month later, a letter written by the Zodiac arrives at the San Francisco Chronicle. Paul Avery (Robert Downey, Jr.) is a Chronicle crime reporter. Robert Graysmith (Jake Gyllenhaal) is a political cartoonist there. The newspaper receives encrypted letters that the killer sends, taunting the police. Because of Graysmith's status as a cartoonist, he is not taken seriously by Avery and the editors and is excluded from the initial details about the killings despite his interest in the case. In particular, he is drawn to the encrypted code that is included with the letters and is given access to one. When he is able to crack one of the codes and makes several correct guesses about the killer's actions, Avery begins sharing information with him.
The Zodiac killer attacks again, stabbing Bryan Hartnell and Cecelia Shepard (Pell James) at Lake Berryessa in Napa County. Shepard dies as a result of the attack, while Hartnell survives. Soon afterward, San Francisco taxicab driver Paul Stine is shot and killed in the city's Presidio Heights district. San Francisco police detectives Dave Toschi (Mark Ruffalo) and his partner Bill Armstrong (Anthony Edwards) are assigned to the case, liaising with other detectives such as Jack Mulanax (Elias Koteas) in Vallejo and Ken Narlow (Donal Logue) in Napa. The killer, or someone posing as him, continues to toy with authorities by speaking on the phone with celebrity lawyer Melvin Belli (Brian Cox) when he makes an appearance on a television talk show. Avery and Graysmith form an alliance, delving deeper into the case.
In 1971, Toschi, Armstrong and Mulanax question Arthur Leigh Allen (John Carroll Lynch), a potential suspect in the case. However, a handwriting expert (Philip Baker Hall) insists that Allen did not write the Zodiac letters. Avery receives a new letter threatening his life. He becomes increasingly paranoid and turns to drugs and alcohol. At one point, he shares information with a rival police force which angers Toschi and Armstrong.
By 1975, Avery leaves the Chronicle. Armstrong quits the homicide division, and Toschi is demoted for supposedly forging a Zodiac letter. Graysmith, meanwhile, continues his own in-depth investigation, interviewing witnesses and police detectives involved in the case. Obsessing over the unsolved case, he begins receiving anonymous phone calls with heavy breathing (on the night of Ferrin's death, Graysmith discovered that someone prank-called the victim's family and did the same thing). Due to his submersion in the case, Graysmith loses his job and his wife Melanie (Chloë Sevigny) leaves him, taking their children with her.
Graysmith persistently contacts Toschi about the Zodiac murders and eventually impresses the veteran detective with his knowledge of the case. While Toschi cannot directly give Graysmith access to the information he discovered over the years, he provides contacts of other police departments in counties where the other murders occurred. The cartoonist acquires more information that points to Allen as the Zodiac, and although circumstantial evidence seems to indicate his guilt, the hard evidence, such as fingerprints and handwriting samples, exonerate him. In December 1983, a full 14 years after the original slayings, Graysmith tracks down Allen to a Vallejo hardware store, where he is employed as a salesclerk. Eight years later, in 1991, Mageau meets with authorities and identifies Allen from a police mugshot.
Final title cards, however, inform the audience that Allen died in 1992 before he could be further questioned by police, and that DNA tests performed in 2002 did not match samples gathered from the Zodiac letters.