Deanna Troi, Geordi La Forge and Wesley Crusher are invited to Commander Data's lab under mysterious circumstances. When they arrive, Data informs the three that he has successfully created an android based on information gathered from a recent cybernetics conference, as well as his own structural design. Data names the android "Lal," after the Hindi word meaning "beloved." Lal is at first ambiguous in gender so the android can decide for itself which sex and appearance to take. Troi and Data accompany Lal to the Holodeck to view several thousand possible body types which are then narrowed down to a handful, and finally one; a human female with more realistic skin pigmentation than Data.
When Captain Picard is informed of Lal's creation, he expresses frustration towards Data for conducting the android's construction in secrecy. Data questions Picard's concerns, asking why other non-android crew members are allowed to procreate in privacy and without authorization from anyone. Picard is more genuinely concerned about the reaction from Starfleet once they learn of Lal's creation. In the meantime, Lal is brought to Ten-Forward to work under the supervision of Guinan for the purpose of expanding her social skills, motor functions and reflexes. In so doing, Guinan is able to educate Lal about the concepts of human intimacy and bonding. This, combined with Lal's sudden and inexplicable use of an English language contraction leaves Data awestruck at her rapid growth and possibly superior potential. Lal informs Data that she has learned about the concept of holding hands as a sign of affection, duplicating the gesture with her father.
Meanwhile, Picard is contacted by Anthony Haftel, a Starfleet Admiral who intends to rendezvous with the Enterprise to gauge whether the young android is in a suitable environment for proper growth. Upon arrival however, Haftel informs Picard that he intends to seize Lal and move her to the Daystrom Institute where she can be properly accustomed to the universe around her. This move involves separating Lal from Data completely. Although aware that Starfleet views Lal as an opportunity to conduct more research into positronic technologies and the capacity for new technological advantages for the Federation, both Data and Picard express their concern over this decision. Data states, "There are many things she can learn only from me. My lifetime of experiences, the mistakes I have made and what I have learned from them."
Haftel and Picard sit and speak with Lal directly, eventually asking her what her wishes are. When Lal expresses her wish to remain with Data on board the Enterprise, she is excused so that Haftel and Picard can continue their discussion. However, Lal begins suffering from pangs of severe fear and distress which begin seriously affecting her functions. She seeks out Deanna Troi in her quarters. Although Deanna is not capable of sensing the android's emotions, she is nevertheless able to see the obvious physical distress that Lal is enduring when she speaks of the Starfleet Admiral that has come to take her away.
Haftel asks Commander Data to support his decision to take Lal away from him. Data expresses his objections and attempts to convince Haftel that the bond between father and daughter cannot be broken at such an early stage in her life. Data states, "As Captain Picard told me after he first met her, I have taken on 'quite a responsibility.' I have brought a new life into this world. It is my duty, not Starfleet's, to guide her through these first difficult steps to maturity, to support her as she learns, to prepare her to be a contributing member of society. No one can relieve me of that obligation. And I cannot ignore it. I am her father."
Haftel orders Data to transport Lal to his ship, but Picard, who helped establish Data and other androids as living, sentient beings with defined rights and privileges, commands Data to belay this order. Admiral Haftel suggests to Picard that he may be putting his Starfleet career in jeopardy, of which Picard is no doubt fully aware. Nevertheless, he reaffirms his stand vigorously. Picard states, "There are times, sir, when men of good conscience cannot blindly follow orders. You acknowledge they are sentient, but ignore their personal liberty and freedom. Order a man to turn his child over to the state? Not while I am his captain. If you wish, the Enterprise is prepared to accompany you to Starfleet Command and then we'll see what..."
Before the tense standoff can continue, Troi contacts the observation lounge and informs Data and Picard that something is terribly wrong with Lal. The three head to Data's laboratory where Lal has been programmed to return in the event of an emergency. Data diagnoses the problem as a severe cascade failure that threatens to overload Lal's positronic functions. Admiral Haftel offers his assistance to Data in preventing the failure, at which point the two begin exhaustively trying to save Lal's life. Troi, La Forge and Wesley wait outside of the lab for news on Lal's condition. Some time later, a shaky Admiral Haftel emerges from the Lab to deliver the news that Lal cannot be saved, and will succumb shortly to the cascade failure. Fighting back tears, Haftel recounts Data's fierce fight to keep his daughter alive, even as the cascade failure overwhelmed Lal's positronic net. He leaves the three, remarking that "it just wasn't meant to be."
Inside the lab, Data tells Lal that he is unable to prevent the cascade failure. Lal understands, and thanks Data for her creation and the opportunity to live. Before succumbing to cascade failure, she sincerely says "I love you, father," allowing Data no response, as he does not understand the concept of the emotion. Data stays with Lal to the end as her positronic brain shuts down, ending her life.
The crew mourn Lal's loss and express their sincerest condolences to Data, who thanks them for their kindness. He informs the crew that he has downloaded Lal's memories and experiences into his own neural net to further enrich his own life. In that manner, Lal is able to live on in some form. Data then takes his station and the Enterprise is able to continue onward to their next mission.
Because of the complexity of Lal's positronic brain, it is never known if she was feeling genuine human emotion as a result of neural net growth, or if the emotions were the result of an anomaly or design flaw that ultimately led to Lal's cascade failure. It remains one of the show's saddest and most tragic episodes.