James Cole is a convicted criminal living beneath a post-apocalyptic Philadelphia in the year 2035. In 1996–97, the Earth's surface had been contaminated by a virus so deadly that it forced the survivors to move underground. In the years that followed, scientists had engineered an imprecise form of time travel. To earn a pardon, Cole allows scientists to send him on dangerous missions to the past to collect information on the virus, thought to have been released by a terrorist organization known as the Army of the Twelve Monkeys. If possible, he is to obtain a pure sample of the original virus so that a cure can be developed. Cole is troubled by recurring dreams involving a chase and an airport shooting.
Cole arrives in Baltimore in 1990, not 1996 as planned. He is arrested and hospitalized in a mental institution on the diagnosis of Dr. Kathryn Railly. There he encounters Jeffrey Goines, a fellow mental patient with fanatical animal rights and anti-consumerist leanings.
Cole tries unsuccessfully to leave a voicemail on a number monitored by the scientists in the future. After an escape attempt, Cole is locked in a cell, but disappears, returning to the future. Back in his own time, Cole is interviewed by the scientists, who play a distorted voice mail message which gives the location of the Army of the Twelve Monkeys and asserts that they are responsible for the virus. He is also shown photos of numerous people suspected of being involved, including Goines. The scientists then send Cole back in time again, first to a French trench during World War I where Cole is shot in the leg before successfully transporting him to 1996.
Cole kidnaps Railly and forces her to take him to Philadelphia. They learn that Goines is the founder of the Army of the Twelve Monkeys, and set out in search of him. When they find and confront him, however, Goines denies any involvement with the virus and suggests that wiping out humanity was Cole's idea in the asylum in 1990. When the police approach, Cole vanishes. Railly then finds evidence that Cole had been telling her the truth, including a photograph from World War I in which Cole appears, and a bullet in his leg verified to be from that time period.
Meanwhile, Cole convinces himself that his future experiences are hallucinations, and persuades the scientists to send him back again. Railly tries to settle the question of Cole's sanity by leaving a voice mail on the number he provided, thereby creating the message the scientists had played right before they sent Cole on his second mission. Both Railly and Cole realize that the coming plague is real, and make plans to try to enjoy the time they have left.
On their way to the airport, they learn that the Army of the Twelve Monkeys was not the source of the virus; the group's major act of terrorism is to release animals from the zoo and to place Goines's Nobel Prize-winning father in an animal cage. At the airport, Cole leaves a last message telling the scientists that in following the Army of the Twelve Monkeys they are on the wrong track, and that he will not return. He is soon confronted by Jose, an acquaintance from his own time, who gives Cole a handgun and instructions to complete his mission.
At the same time, Railly spots Dr. Peters, an assistant at Goines's father's virology lab. Peters is about to embark on a tour of several cities that matches the locations and sequence of the viral outbreaks. After forcing his way through the checkpoint in pursuit of Peters, Cole is fatally shot by police. As Cole dies in Railly's arms, she makes eye contact with a small boy: the young James witnessing the scene of his own death, which will replay in his dreams for years to come. Peters, aboard the plane with the virus, sits down next to Jones, one of the scientists from the future. She draws Peters into a discussion about whether he believes humanity is doomed or not.