While the USS Enterprise-D is docked at a new Starbase for routine maintenance, they are paid a visit by resident cyberneticist Commander Bruce Maddox. Maddox was on the commission that years earlier determined Data's eligibility to enter Starfleet Academy; Maddox had cast the only dissenting vote on the grounds that Data, an android, was not a sentient being.
(The episode teaser sets up the question of Data's "humanity" by featuring him in a poker game with Riker, Lieutenant La Forge, Doctor Pulaski, and Chief O'Brien. Data decides that the game of poker is easy, with only a limited number of cards and five players. However, despite his 3 Queens, he folds in the face of Riker's apparent flush. When he discovers that Riker had nothing, he is puzzled and has to have the both the concepts of "bluffing" and "instinct" explained to him.)
Maddox explains that he wants Data to help him understand better how his creator Dr. Noonien Soong was able to overcome certain problems when designing Data's positronic brain.
Data is intrigued until he discovers that it is Maddox's intention to download Data's memories into another computer, deactivate him, and then disassemble him. Data points out that Maddox doesn't have the necessary knowledge to carry out this procedure safely, and so he refuses to undergo it.
Maddox then issues an order backed up by Starfleet Command for Data to submit himself to disassembly. Picard refuses to allow Data to go along with the order and Data concludes that only his resignation will allow him to circumvent the order. Maddox, however, contends that Data cannot resign as he is the property of Starfleet, not a sentient being with rights.
Picard persuades Starfleet Judge Advocate General Philippa Louvois, who had previously court-martialed him over the loss of the Stargazer, to hold a hearing to determine Data's status. Having to use available personnel, the JAG officer drafts Commander Riker to represent the prosecution, and Captain Picard to serve as Data's defense counsel.
In the trial, Riker, under orders to do his best to prosecute Data or have the JAG Officer summarily rule against Data ("Data is a toaster"), presents an effective case of Data being property because he is merely a sophisticated machine. During the recess, Picard is all but ready to concede until Guinan points out that a ruling against Data's right to choose goes beyond proving the moot argument of whether or not Data is a machine, but that it is tantamount to sanctioning slavery. Emboldened, Picard proceeds to explain this to the court, beginning with the opener that even human beings are technically created, but that does not make them the properties of their creatorsâtheir parents. In cross-examining Maddox, Picard argues that Data fulfills two of the cyberneticist's three criteria for the definition of sentience, which are: intelligence, self-awareness and consciousness. After proving to the court that Data is both intelligent and self-aware, Picard then challenges anyone in the room to provide a method of measuring 'consciousness'. In his concluding statements, Picard adds that the court's decision on the issue will not only touch on the interests of a single android, but will determine the fates of generations of intelligent androids to come. He warns that if Data were to be reproduced under the assumption that he is a piece of property, the Federation effectively would be creating a race of slaves, a profound affront to the ideals and principles of the United Federation of Planets. After listening attentively, the Judge Advocate General notes that, when humans speak of 'consciousness' they are often referring to the metaphysical concept of the soul. She then states that she is not qualified to attest to whether Data, or any other members of the room is in the possession of a soul. She therefore concludes that Data has as much of a right to his choices as everyone else.
After the judgment, Data reassures a demoralized Maddox that his research is intriguing and he will be willing to participate when satisfied that the procedure could be performed safely; for the first time, Maddox refers to Data as "he" rather than "it". After the trial, Riker shuns the celebration in shame for the role he played in the trial. Data lifts Riker's spirits by telling him that he is well aware that he did not wish to argue against Data, and is actually grateful for Riker's actions, as without them he would have lost the judgment by default.