Thomas Anderson is a computer programmer who maintains a double life as the hacker "Neo". Another hacker named Trinity contacts Neo and informs him that a man named Morpheus can tell him the meaning of "the Matrix", a phrase that Neo has encountered repeatedly online but does not understand.
However, three dark-suited Agents, led by Agent Smith, are determined to prevent Neo from finding out what the True meaning and intention of what "The Matrix" is. Neo eventually meets Morpheus, who warns him that once he shows Neo the Matrix, he will not be able to "go back". Neo accepts his offer by choosing red pill; his reality soon disintegrates and he abruptly wakes, naked and weak, in a liquid-filled vessel, finding himself as one of billions of people connected by cables to an elaborate electrical system. He is rescued and brought aboard Morpheus's levitating ship, the Nebuchadnezzar.
Morpheus explains that in the 21st century, humans waged a war against intelligent machines they had created. When humans blocked the machines' access to solar energy, the machines instead harvest the humans' bioelectricity as a substitute power source, while keeping them trapped in "the Matrix", a shared simulation of the world as it was in 1999, in which Neo has been living since birth. Morpheus and his crew belong to a group of rebels who hack into the Matrix and "unplug" enslaved humans, recruiting them as rebels. The rebels' understanding of the true nature of the simulated reality allows them to bend its physical laws, granting them seemingly superhuman abilities. Neo is warned that fatal injuries within the Matrix will also kill one's physical body, and that the Agents he encountered are powerful sentient programs that eliminate threats to the system. Neo's skill during virtual combat training lends credence to Morpheus' belief that Neo is "the One", a man prophesized to end the war between humans and machines.
The group enters the Matrix to visit the Oracle, a prophet who predicted the emergence of the One. The Oracle implies to Neo that he is not the One, and warns that he will soon have to choose between his life and the life of Morpheus's. Before they can leave the Matrix, the group is ambushed by Agents and tactical police. Morpheus allows himself to be captured to let Neo and the rest of the crew escape; however, their getaway is hindered by Cypher, a crew member disillusioned with the harshness of the real world, who has secretly betrayed them to the Agents in exchange for a return to comfortable life within the Matrix. Cypher disconnects first and murders several of the still connected crew members as they lie defenseless, before he is killed by Tank, a crewman whom he had left for dead.
In the Matrix, the Agents interrogate Morpheus in an attempt to learn his access codes to the mainframe computer in Zion, the rebel humans' refuge in the real world. Believing that he is not the One, Neo proposes returning to the Matrix to rescue Morpheus, and Trinity insists she accompany him. They succeed in rescuing their leader, and in doing so, Neo gains confidence in his abilities, performing feats on par with those of the Agents. Morpheus and Trinity exit the Matrix, but Smith ambushes and kills Neo before he can leave. In the real world, "sentinel" machines attack the Nebuchadnezzar, while Trinity stands over Neo and whispers to him that the Oracle told her that she would fall in love with the One. She kisses Neo, and he revives with newfound power to perceive and control the Matrix. He effortlessly destroys Smith and leaves the Matrix in time for the ship's electromagnetic pulse weapon to destroy the attacking sentinels.
Some time later, Neo makes a telephone call in the Matrix, promising the Machines he will show their prisoners "a world where anything is possible". He ends the call and flies into the sky.