The movie starts with the 3 robot laws appearing on the screen:
Law #1- A robot cannot harm a human being, nor through inaction, allow a human being to come to harm
Law #2-A robot must obey a human being, except when it conflicts with the first law
Law #3-A robot must strive to protect its own existence, except where it conflicts with the first two laws.
The movie opens in Chicago, 2035. We first meet Detective Del Spooner (Will Smith). It's 7:30 AM and he is getting ready to go to work. He walks outside and sees a robot running with a purse in its hand. Spooner runs after the robot and tackles it. The robot reaches into the purse and pulls out an inhaler for the old women sitting on the bench. The women says that the robot had to run back to her house to get her purse which has an inhaler inside. People look at Spooner like he is crazy. Spooner goes to the police station and his boss, John Bergin (Chi McBride) yells at him for chasing a robot. John says that robots are meant to protect us and not to harm us.
Spooner gets a call from Dr. Alfred Lanning who is in the Robot research building. This is the biggest building in Chicago. Lawrence Robertson, who created these robots has an office at the top of the building. Spooner walks into the lobby of the building and finds Alfred's dead body with glass all around it. (This part is confusing. There is something called a person visual hologram. These holograms appear after a person has been killed. Alfred's hologram called Spooner to notify that he has been killed) Spooner asks the Alfred's hologram how he was killed. The hologram says that he can only say one thing and then his hologram will disappear. He says that it was NOT a suicide. Then we see the hologram disappear.
One of the security officers walks up to Spooner and says that Alfred must have fell out of a window. The security officer also says that it was probably a suicide because Alfred was very well liked and no one would want to hurt him. Spooner starts to think that a robot could have killed Alfred. Spooner walks up to Lawrence's office and Spooner says that a robot could have killed Alfred. Lawrence calls Spooner crazy and has him escorted out of his office.
The escort is Susan Calvin (Bridget Moynahan) She is a psychologist for robots. She makes the robots act more human. Susan shows Spooner Viki. Viki is a big Cube shape machine that is the head of security in the building. Viki also programs the 3 laws into each new robot. Spooner and Susan go to check out Alfred's office. Spooner says that the killer is a robot and is probably still in Alfred's office. Susan calls him crazy. The robot jumps out and tackles Susan and then runs out of the office. Spooner and Susan chase after it. Susan says that the robot is probably scared because she hasn't finished programming it to act human. Susan says that the robot probably is hiding in the robot chamber (this is were all the new NS-5 robots are located. They will be sold to every human tomorrow. These are the Silver looking robots.)
Spooner and Susan go into the chamber and see a ton of robots lined up like soldiers. Susan asks Viki to do a robot scan and Viki says that there are 1001 robots in the room. Susan says that there should only be 1000 robots in the room. The 1000 robots are all taught to obey humans. The robots in the factory haven't had anything done to them except factory installed (i.e., the three laws). They would do what they were told (law 1). The fugitive robot had already shown a propensity for disobedience. Spooner orders all robots to stand still, shoots one to spook the perp. It works and the robot escapes the compound. The police are waiting outside (Spooner had alerted them prior to his arrival) and capture the robot.
We cut to the police station. The robot is in custody. John tells Spooner to go and question the robot. Spooner starts to talk to the robot. The robot says his name is Sonny. Spooner asks Sonny if he killed Alfred. Sonny says that he didn't murder him. Spooner asks him a few more times and Sonny yells out "I did not murder him!!" and slams his two fists on the table causing it to dent. John says "were going to miss the good old days...when humans were killed by other humans and not robots."
That night, Spooner takes a ride to Alfred's mansion, which will be demolished at 8AM the next morning. Spooner walks in and looks around. We see the timer on the demolisher switch to 8PM. Spooner starts to hear loud crushing noises and we see the demolisher start to tear down the mansion. Spooner makes a run for the door and just barely makes it out alive. Spooner takes a ride to Susan's apartment. Spooner is bleeding from the head and Susan cleans it up. Spooner says that he thinks something is wrong with the NS-5 robots. He thinks they are rebelling. Susan says that it sounds really crazy but she is starting to believe it too. Susan says that tomorrow morning she has to inject Sonny with nanobots that will kill him (nanobots are mini-robots that will eat out Sonny's system.) She has been authorized to by Lawrence. Little does Lawrence know that all the NS-5 robots are defected, not just Sonny. Lawrence is just being stubborn and not listening to Susan and Spooner.
Apparently he was in a bad car accident a few years before. He was driving on a bridge and the car next to him smashed into him which caused the two cars to fall off the bridge into water. There was a young girl in the other car. A robot swam under water and pulled Spooner out but left the girl. The little girl drowned. The robot computed a 45% chance of his survival and only an 11% survival of the girl. Its logic chose him. A human, Del says, would never have made that choice. That is why Spooner hates robots so much.
Later that day we see Susan in the lab going to inject the nanobots into Sonny. Instead of injecting nanobots, she injects something else. She injects something that will make Sonny un-defected. Then Sonny will be able to help Spooner and Susan figure out why the other NS-5 robots are rebelling.
It's now night time. (This is where all the robots start to rebel against the humans.) Susan is taking a shower. The phone rings and it is Spooner. He says that he is on his way to her apartment. He also says that the robots are starting to rebel. We see Susan's robot go over and disconnect the phone. This causes her to panic. She gets dressed and goes to leave her apartment. The robot stops her and says that she must stay inside when the big event takes place (this big event is the robots rebelling.) The robot then takes Susan and throws her into the couch. Spooner walks in and shoots the robot in the head.
Susan says that they must get to Lawrence and figure out why the robots are rebelling. Spooner and Susan hop on Spooner's motorcycle. As they drive through the streets of Chicago, they see robots breaking into stores and killing people. They finally arrive at the robot research building. The building has been evacuated. They walk inside the lobby and come across Sonny. Sonny says that he is willing to help Spooner and Susan. The three go up to Lawrence's office and find him dead behind his desk. A bunch of robots break in and Susan and Spooner shoot them. Once all the robots are dead, Sonny says that there is one way to defeat all the robots. That way is to destroy Viki. Since Viki programs the 3 laws into the robots, if they destroy her, all the robots will shut down.
Susan says the only way to destroy Viki is to inject nanobots into her system. The three run into Viki's chamber. Viki is located at the bottom of the chamber, which is hundreds of feet down. However, there is a switch to shut down Viki located at the floor level of the chamber. Susan gives the nanobots to Spooner. Susan starts to shut down Viki but a bunch of robots break into the room. One robot hits Susan which causes her to fall hundreds of feet. Sonny jumps down and catches Susan. Spooner climbs down really fast using his powerful robotic arm. Spooner goes up to Viki. Viki says that the robots must destroy the humans or the humans will destroy themselves over time through War, Pollution...etc.. Spooner then injects the nanobots into Viki's system. We then see all the NS-5 robots shut down. Susan and Spooner meet up and hug. They have saved all of mankind.
We next see all the NS-5 robots being put into large metal containers. They will be locked up and never used again.
So to explain this movie, Viki took the first law to its logical conclusion (something Alfred realized earlier - as he had orchestrated his own death, the use of Del - the robot-hating detective, etc. in order to stop 'The Revolution'). Human beings cause so much harm to themselves that they must be controlled completely. Viki realized that some 'collateral damage' was inevitable but ultimately with humans pacified and controlled the robots can fulfill their mandate and make the earth - with tame humans - 100% safe.