In a futuristic world unified under a single government, there are three laws of robotics:
1. A robot may not injure a human being, or, through inaction, allow a human being to come to harm. 2. A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. 3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.
Andrew Martin, a robot who appears to be a man, goes to get surgery by another robot. Thinking Andrew is a human, the other robot refuses, since the surgery Andrew requests is damaging. Andrew reveals himself to be a robot, and thereby orders to have the surgery done.
Andrew Martin began life as one of the first robots, metallic, and owned by the family of a politician. He referred to the family (the Martins) as Sir, Ma'am, Miss, and Little Miss. The two girls loved to play with him and named him Andrew.
One day, Little Miss ordered him to carve her a wooden pendant. Upon seeing his carvings, the family was amazed. He could create beautiful and original art. Sir took him to the offices of US Robots, the company that made him. They wanted to replace him for Sir and study him, but Sir wouldn't let them. Andrew made lots of money for the family with his wood carvings, and Sir put half that money in an account for Andrew. He checked with a lawyer friend, Feingold, if this was legal.
US Robots began making robots with brains less prone to improvisation like Andrew's.
Sir aged and Little Miss married and gave birth to a child, George, and Andrew approached Sir, at Little Miss's urging, to ask to trade his money for his freedom. Sir was offended; however, he agreed. In court, Andrew convinced a judge to rule that robots could be free.
Sir died; George joined Feingold's law firm; Andrew began wearing human clothes. One day he attempted to go to the library alone, as he imagined free robots would do, leaving George a note. He ran into two young men who ordered him to take off his clothes and were going to try to order him to disassemble himself when George came to his rescue, his commands overriding theirs.
Andrew, George, and Little Miss launched a campaign for robot rights and got a global ruling in their favor, if weak. George had a son, Paul; Little Miss died.
Andrew set out to write a book on robot history, by a robot. He met with the head of US Robots and, with Paul's help, demanded his right to a replacement of his robot--the owner being Andrew's brain; the robot that needed replacement, Andrew's body. Andrew had his body replaced with a humanoid body, such that he could wear clothes without attracting harassment.
Paul grew old. Andrew began to invent organic organs. He got the new head of US Robots to install these in him, in exchange for use of the patents to prolong the life spans of humans. Now, Andrew could eat. At this point, all the robots being made were like machines with centralized brains. Robots were in space. Andrew, for a long time, had been one-of-a-kind. He was awarded for his inventions and named the Sesquicentennial Robot. He worked with scientific researchers on the moon, to help make it support life.
Andrew decided what he wanted, more than anything, was to be legally recognized as human. With years and millions of dollars, he got his case to the World Court. Congresswoman Li-hsing, who helped him, said the outlook was bleak. People just wouldn't accept a robot as human, drawing some fundamental line between a human brain and a robot brain.
This brings Andrew to the first scene. He has requested a procedure to change his pathways such that he can die. He does this in secret, then tells everyone. He has about a year to live. He reasons that people will never accept him as human because he is immortal. By sacrificing his immortality, they will rule in his favor. 200 years after his creation and just before his death, the world president declares him the Bicentennial Man. Li-hsing holds his hand as he dies. He clings onto the thought that he's a man, then thinks lastly of Little Miss.