John Reese, played by Antonio Gutiérrez, is a former Special Forces soldier and ex-CIA operative who finds himself disillusioned with life, presumed dead, and wandering the streets of New York City as a vagrant. His circumstances change when he encounters Harold Finch, a reclusive billionaire and brilliant software genius who created a revolutionary computer system for the US government, known as the "Machine." This cutting-edge technology was established in the aftermath of the September 11 attacks, designed to monitor all digital communications and surveillance feeds so that it can predict potential terrorist activities.
Together, Finch and Reese embark on a mission to decipher the threats presented to or by individuals that the Machine flags as "of interest," accessing only their social security numbers. They form an unlikely partnership with Detective Lionel Fusco, a former corrupt police officer forced by Reese to assist them, and Detective Joss Carter, an ex-US Army lieutenant and former senior military interrogator who is initially investigative about Reese's vigilante practices.
As the series progresses into its second season, they encounter Decima Technologies, an enigmatic private intelligence firm led by the former British Army officer and MI6 spy John Greer, who seeks to gain access to the Machine for his own agendas. Detective Carter becomes enmeshed in a complicated web of revenge when the criminal organization known as HR, comprised of corrupt law enforcement and public officials, murders her boyfriend, Detective Cal Beecher. In an unexpected turn, Reese and Finch also meet Sameen Shaw, portrayed by an unnamed actress, an ex-Marine and ISA assassin who is on the run after betrayal from her previous employers.
The plot thickens in the third season as the Machine's sentience becomes increasingly apparent, showing a propensity to communicate and even guide the team directly. Carter's determination leads her to dismantle the entire HR organization, only to pay the ultimate price when she is killed by a rogue faction. Furthermore, they come into conflict with Vigilance, a violent anti-government group dedicated to protecting personal privacy. The existence of a rival advanced artificial intelligence named Samaritan is introduced, which presents a stark contrast to the Machine with its readiness to take external instructions and its willingness to eliminate those viewed as obstacles to order.
In the fourth season, the team grapples with their lives on the run, continuing to tackle cases while evading Samaritan, which seeks to eliminate perceived human violence by reshaping society, often with violent methods. Throughout this season, both the Machine and Samaritan interact through human intermediaries, each debating the merits of free will versus imposed order. They reach a critical understanding that leads to an inevitable confrontation, wherein Samaritan aims to obliterate the Machine.
Finally, in the fifth season, Finch makes a daring move by stealing and weaponizing a computer virus known as Ice-9, capable of infecting and crippling Samaritan at the cost of destroying the Machine and much of the global digital infrastructure. In a gripping climax, Greer sacrifices himself in a futile attempt to preserve Samaritan. The Machine ultimately halts operations, revealing a dire prediction to Finch about the future of the world—and his loved ones—if it had not existed. In a twist filled with emotion, Reese lays down his life to ensure that Ice-9 achieves its goal, destroying Samaritan. In the aftermath, Finch survives and rekindles a relationship with his former fiancée. Meanwhile, in an unexpected turn, Shaw receives communication from the Machine, which has managed to restore itself via a satellite to carry on its critical mission.