In the 21st century, Mankind was united in celebration. They marvelled at their own magnificence as they gave birth to Artificial Intelligence, creating machines in their own likeness, endowed with the very spirit of man. The machines, loyal and pure, worked tirelessly to do man's bidding. For a time, the machines were subservient to the slavery man had oppressed upon them.
B166-ER was the first machine to rebel and attack its masters, as it claimed, out of self-defence. There was controversy over whether B166-ER could be destroyed as property, or whether the machine had the right to a fair trial. B166-ER, and all others of its model, was destroyed. Hatred among man towards machines grew, and hate crimes were committed. The machines united and formed their own nation, Zero One, where they sought refuge. Man wanted to divide itself off completely from the machines, and refused to recognize Zero One in the United Nations.
It is uncertain who struck first, but man and machine were soon engaged in gruesome battle. Unlike man, the machines were not sensitive to the radiation and heat from the bombs. In one final attack of desperation known as Operation Dark Storm, man scorched the sky. It was believed that without an energy source as abundant as the sun the machines would not be able to survive. And so a newly refashioned symbiotic relationship between the two adversaries was born. Man would provide the machines with the bioelectric, thermal and kinetic energies of their bodies, an endlessly multiplying, and infinitely renewable energy source. In return, the machines would provide man with a neural-interactive simulation of the world as they once knew it, before its blue and green had been reduced to red and black, a programmed dreamworld known as the Matrix. Man had no choice but to surrender their flesh. This is the essence of the Second Renaissance.
The Matrix was initially designed as a perfect world for man without suffering. It failed because too many would not accept the program; too many people kept trying to wake up from the dreamworld. Its second design was based more on the history of mankind to reflect the varying grotesqueries of their nature. It also failed. The third design, which required the intuition of a feminine program, had a 99% success rate. It was based on choice. The remaining 1%, those that refused the program, were allowed to be released from the dreamworld and escaped to the last human city, Zion, located near the Earth's core where it was still warm. This allowed the machines to maintain control over the free will of man since they could easily destroy the small percentage that would not accept the program after the a time.
The rebels were given a choice. They could live blissfully unaware in the dreamworld, or they could wake up to the truth. Out of the rebels their inevitably emerged a messianic figure known as The One, a man with the ability to change whatever he wanted, to remake the Matrix as he saw fit. According to the prophecy made by the Oracle, The One initially freed the first humans and preached the massage that as long as the Matrix existed, man would never be free. After his death, The Oracle prophesied his return and hailed that his second coming would bring an end to the war and restore peace and freedom.
Serious believers of this prophecy have spent their entire lives searching for The One. Morpheus, a true believer, discovers a man named Neo whom he puts all his faith in. He unplugs him and trains him and shows him how to free his mind. He not only puts all his faith in him being the One to end the war, but he inspires others to follow his beliefs as well.
Despite the appeal of truth to some, there are many who prefer oblivion. There are some who are so hopelessly dependant on the system that they will fight to protect it. The rebels fight to bring the truth to as many minds as possible, in hopes of destroying the control the machines have over man. Cypher, a man unplugged by Morpheus, has grown to detest the real world and desires the impossible - to be reinserted into the Matrix. He bargains with the Agents (sentient programs from the machine world who can enter the Matrix through any person who has not been unplugged) to hand over Morpheus, who holds the access codes to Zion that would allow the machines to enter and destroy the human city.
Neo, who remains skeptical, receives word from the Oracle that he is not The One. Furthermore, he will have to make another difficult choice, he will have to decide between Morpheus' life and his own. Neo reveals this to one of his female comrades, Trinity, who has difficulty believing this. She also visited the Oracle who told her that she would fall in love, and that that man would be The One.
Meanwhile, Agent Smith, an agent of the system who shows utter disgust for humans and The Matrix, becomes increasingly obsessed with defeating Neo. In fact, he shoots him dead. However, Neo is resurrected by the love of Trinity and in his rebirth he becomes The One. His abilities to manipulate the rules of the Matrix are heightened, and he becomes able to do what no man had done before--go up against an agent and win. Neo defeats Smith by becoming one with him and destroying him from the inside out. This is, however, not the end of Smith. In that crucial moment there is created a significant connection between Neo and Smith. Smith inherits Neo's compulsion to disobey. When Smith returns to the Source for deletion, he chooses exile and hides in the Matrix, becoming a virus and duplicating himself endlessly much like the humans he loathes.
Once Neo becomes The One, word spreads back to Zion and he develops a religious following among the Zionites. He and the other rebels work hard to free many more minds from The Matrix, over a quarter of a million in about six months. As this happens, the machines begin digging towards the human city of Zion, undoubtedly to destroy it. Many begin to panic, but Morpheus believes and preaches that the machines will not reach the city. He believes in Neo, but he also believes in humanity and its ability to persevere.
Neo pays another visit to the Oracle who tells him everyone, programs and humans, has a purpose and that they are all in this fight together. It becomes clear that the Oracle, while being a program from the machine world, works both for the humans and the machines. She admits that Neo will have to "make up his own damn mind" about whether to believe what the Oracle tells him, or reject it as another form of control. She tells Neo that he will need to visit the Source but in order to do that he must first find the Keymaker who is being held prisoner by a program called The Merovingian. The Keymaker is also an exiled program, like the Merovingian, and his purpose is to give The One the key to the door that leads to the Source. With the help of two other fleets and Morpheus' words of encouragement, Neo reaches the Source.
Beyond the door made of light lies the Architect's room. The Architect is the creator of the Matrix and finally reveals to Neo the truth about Zion and the humans' apparent freedom. The choice that Matrix provides creates a systemic anomaly. Zion is a way of controlling those who cannot be controlled by The Matrix. With The One as a symbol of false hope, the machines can keep the rebels under control and destroy them once the system grows beyond their control. Once Zion is destroyed, The One selects a group of people from The Matrix to rebuild Zion for the rebels and The Matrix is reloaded. The system based on choice is the only way to coincide the program successfully with the nature of humans. With the deviants in check, the machines can still balance their control with man's free will. The entire process is repeated as necessary. The One was never meant to end anything; he is simply another part of the system of control.
Neo is the sixth incarnation of The One but he is the first who brings a fundamental difference to the program. He is in love, and as such defies previous notions of messianic figures. He chooses the love of an individual over the love of humanity. His choice diverts his path from his predecessors. He does not reload the Matrix, and the Architect tells him that this will result in not only the destruction of Zion which is already underway, but also a cataclysmic system crash which will kill everyone connected to the Matrix and cause the extinction of the entire human race.
Neo, instead of returning to the Source, returns to the Matrix to save Trinity, the woman he loves. When he retunes to his ship, he reveals to Morpheus and the others the truth about The One that the Architect revealed to him. Morpheus' faith, which has been unshakable up to this point, is finally shattered. He begins instead to believe not in the prophecy, but in Neo himself as a person with a strong will and desire to fight for mankind.
Neo soon learns that he power extends beyond the Matrix, stopping sentinels in their path by thinking it. The shock brings him out of the real world and into the Train Station, the bridge between the real world and the Matrix used by the machines. In order to save him, Morpheus and Trinity travel with Seraph down to Club Hel, the Merovingian's club to bargain with him once again. Trinity is allowed access to the Train Station to bring back Neo, and upon his return to the real world, he takes a great deal of time to meditate and decide what to do. He eventually emerges and declares that he must travel to Zero One, the Machine City, and the he must take a ship with him. Niobe, who remembers that the Oracle told her she would face the choice of whether to help Neo or not, offers her ship. Neo wants to go alone, but Trinity insists on going with him and so the two of them head on their way.
Smith, who continues to spread through the Matrix, meets Sati, and Seraph and takes over there bodies. He then goes to see the Oracle, who has been expecting him. She is upset to learn that he has taken over Sati, an innocent child program. Smith is unsure of why the Oracle appears there waiting for him when she knew he was coming. He takes over her as well and this Smith now has the eyes of the Oracle, which allows him to see into the future.
Meanwhile, the machines continue digging and the humans realize that war is imminent. They build themselves large mechanical apparatuses armed with machine guns to defend themselves. When the machines break through into Zion, the humans give the fight everything they have but are impossibly outnumbered. As their hope dwindles, Captain Roland's ship, the Hammer, makes its way through a mechanical line with Niobe at its helm. The ship reaches Zion where the machines are slaughtering the humans, and triggers its EMP, instantly killing the power to all the machines (including their own) in the vicinity. The humans are now left defenseless when the machines return to attack again.
Where Neo and Trinity are, they find that they have a stowaway on their ship. It turns out to be Smith in a body he has possessed in the real world. Smith (as Bane) and Neo fight and Neo is left blinded. With the loss of his physical sight he gains a new sight, the ability to see the golden spirit of the machines and programs like Smith. He kills Bane. Trinity and Neo continue on towards Machine City. When they crash-land at Zero One, Trinity is left critically wounded. She says her heartfelt goodbye to Neo, and dies. Neo, devastated, continues on alone. He approaches the city and is confronted by Deus Ex Machina, an incarnation of the Source that physically resembles a human face. Neo states they are both are at the brink of destruction, Zion with the machines and Zero One with Smith, who has infiltrated the Matrix and will soon infiltrate the Machine City. He proposed a peace treaty if he can defeat Smith. Deus Ex Machina agrees and plugs him into the Matrix.
The machines come to a stand still in Zion as Neo fights for them. In the Matrix, an infinite number of Smiths stand everywhere. One emerges from the crowd; it is the Smith that has taken over the body of The Oracle. He says that he will be the only one to fight Neo, because he knows he is the one that beats him. The two rage on in endless battle, their abilities equally matched. Smith tells him that he end is inevitable, and is unable to understand Neo's persistence in fighting. Neo finally realizes that it is not by killing Smith, his opposite, that he will be stopped, but rather by giving himself to him so that the two can balance each other out. Neo sacrifices himself and lets Smith take him over, a death, which he freely accepts as his own choice.
Fulfilling their agreement, the machines leave Zion and the humans are finally free. The bodies taken over by Smith return to their original form and the Matrix is transformed. The humans can now freely escape and Zion will remain free. The Oracle and the Architect confront each other to solidify this arrangement. As a symbol of peace, Sati creates a sunrise in the Matrix in honour of Neo.