The story takes place in Chicago in the year 2035. Anthropomorphic robots are widespread and used as slaves and for various public services. They are taken to be inherently safe and programmed to live in harmony with human beings, being designed in accordance with the Three Laws of Robotics (referring to the laws written by Isaac Asimov).
Del Spooner (Will Smith) is a Chicago police detective who dislikes the rapid advancement of technology, including robots. Spooner lives with survivor's guilt and a robotic arm after a car accident, when a robot manages to save him over a 12-year-old girl. Spooner is assigned to investigate the apparent suicide of his friend Alfred Lanning (Cromwell), the roboticist who founded the company U.S. Robotics (USR) and created his replacement arm. With the reluctant help of USR robopsychologist Susan Calvin (Moynahan), Spooner investigates the death. A robot in Lanning's office shows unusual and apparently emotional responses and when it flees during interrogation, Spooner believes this experimental, human-like unit, Sonny (Tudyk), killed Lanning.