The story is loosely based on Ghost in the Shell manga chapter "Robot Rondo" (with elements of "Phantom Fund"). Opening in 2032, Public Security Section 9 cybernetic operative Batou is teamed with Togusa, an agent with very few cybernetic upgrades, following the events of Ghost in the Shell.
After a series of deaths due to malfunctioning gynoids—doll-like sex robots—Section 9 is asked to investigate. As the gynoids all malfunctioned without clear cause, the deaths are believed to be premeditated murders; Batou and Togusa are sent to investigate possible terrorist or political motives. Additionally, the most recent gynoid's remains show they all contained an illegal "ghost". Section 9 concludes human sentience is being artificially duplicated onto the dolls illegally, making the robots more lifelike, and possibly acting as a motive in the murders.
Read more on Wikipedia.