Jadzia Dax begins experiencing unsettling mental problems. She suddenly remembers a melody and can even play it on a keyboard despite never having done so before. She snaps at her friends and is disturbed by the anger she feels for no apparent reason. After she is overcome by a hallucination in which she is cornered by a masked, robed figure she pays a visit to Dr. Bashir for help.
He detects critically low levels of the neurotransmitter isoboramine, the substance that allows the Dax symbiont to live within Jadzia, its current host. Bashir and Commander Sisko rush Dax back to Trill on the Defiant in the hopes that the medical staff at the Symbiosis Commission can help her. One of the experts on the physiology of the joining of symbiont to host, Dr. Renhol, administers some medication that may stabilize Dax's condition.
While she waits for her neurotransmitters to return to normal levels, Dax visits the Caves of Mak'ala, a place on Trill where symbionts swim in pools carefully and lovingly tended by unjoined Trills called Guardians. As soon as she meets the Guardian Timor, he can tell what's wrong with her. He tells her that her hallucinations are actually memories of a previous host. This is confusing to her because she has access to all of the memories of all of her hosts, and these scary flashes are not from any host Dax ever had, to her knowledge.
The Defiant's computer has meanwhile identified the melody that was haunting her earlier. It brings up a biography of its composer, a Trill man named Joran. When Jadzia sees a picture of his face she experiences a strong hallucination, has a seizure, and collapses. When Dr. Renhol examines her, she says that if there is no improvement soon, Dax will have to be removed from Jadzia, which will kill her. Trills value the symbiont's life over that of the host.
Sisko and Bashir begin an investigation. The Guardian, Timor, seems to be less than open with them, and computer files regarding the musician Joran have been deleted. They finally track down Joran's brother, who admits that Joran murdered a physician and was then killed. Joran had been joined to the Dax symbiont by mistake after he had been deemed unsuitable to serve as a host. After the incident, all records in regards to this joining were deleted and the affair was covered up. Dax received a memory block so that the hosts would not remember anything about Joran. The memory block was beginning to deteriorate in Jadzia, causing her symptoms.
When Sisko and Bashir notify the Symbiosis Commission that they have discovered the coverup, Jadzia is released to them instead of having her symbiont removed. They are now aware of a great secret underlying Trill society. Most believe that only a very small percentage of Trills are physically capable of joining to a symbiont, when in truth, roughly half of them are potential hosts and it is the Symbiosis Commission that selects the ones who will receive the limited number of symbionts.
Dax pays one last visit to the underground symbiont pools. She enters a pool and the symbionts help her assimilate Joran into her mind with all of her previous hosts.