In 2029, the world is interconnected by a vast electronic network that permeates every aspect of life. Much of humanity has access to this network through cybernetic bodies, or "shells", which possess their consciousness and can give them superhuman abilities.
Major Motoko Kusanagi, an assault-team leader for the Public Security Section 9, is assigned to capture an elusive hacker known as the Puppet Master. Her team, Batou and Ishikawa, use triangulation to seek out the Puppet Master. Their suspect is a garbageman who believes he is using a program obtained from a sympathetic man to illegally "ghost-hack" his wife's mind to find his daughter. Kusanagi and her team arrest him and the man who gave him the program, but discover that their memories were either erased or implanted: "ghost-hacked" by the Puppet Master.
A facility is hacked and programmed to assemble a female cybernetic body. The body escapes but is hit by a truck; Section 9 investigates and examines the body, which seems to have a human "ghost" insideâperhaps the Puppet Master himself. Officials from rival agency Section 6 visit Section 9 and explain that the body was made to lure the Puppet Master's ghost and trap it inside. Kusanagi espies the conversation and decides to disconnect her consciousness from her current body and connect or "dive into" the body and face the Puppet Master's ghost. Before she succeeds, the ghost activates the body. Section 6 storms Section 9 and reclaims the body.
The information from the body leads Section 9 to uncover the mysterious Project 2501. Section 6 claims the project was created to catch the hacker, but it was initiated before his appearance. Section 9 speculates that the project itself created the Puppet Master, who then escaped, and Section 6 now wants him back. Daisuke Aramaki, head of Section 9, suspects that the project and the Puppet Master are tools of the Ministry of Foreign Affairs. The escape might lead to the release of secrets that could embarrass Section 6 and the Ministry.
The getaway car carrying the Puppet Master meets another, and they split off. Batou stops the first car and realizes it is a decoy. Kusanagi follows the second car to an abandoned building, where she is ambushed by a spider-like armored vehicle. Batou arrives in time to save the badly damaged Kusanagi. With Batou on guard, Kusanagi faces the body stolen by Section 6. The Puppet Master reveals himself and explains that, under Project 2501, it was created by Section 6 to hack ghosts for individuals and Section 6. While wandering various networks, the Puppet Master became sentient and began to contemplate its existence; it was troubled by the fact that it could not reproduce or die. It plans to merge with Kusanagi's ghost to experience mortality; Kusanagi would live on with its ghost. As it could not crack Section 6's attack protection, it was forced to escape in a physical body.
Batou tries to disconnect the dive, but the Puppet Master ghost-hacks him. Helicopters from Section 6 arrive with orders to destroy everyone inside to cover up Project 2501. The Puppet Master disrupts their targeting systems. As it starts merging with Kusanagi, snipers blow their heads off, along with Batou's arm.
Kusanagi wakes up in a child-sized cyborg body in Batou's safehouse. Batou explains that her original body was destroyed in the fight; he recovered her head and attached it to the new body. Kusanagi acknowledges she is now neither herself nor the Puppet Master, but a combination of both. Batou says he will always be there for her. She leaves the house and gazes out over the city.
Who hacks Batou.
Puppet Master