Traveling through deep space, the Enterprise stops to investigate an odd phenomenon that appears like phantom images. Meanwhile, ship's counselor Deanna Troi experiences disorientation as her empathic abilities suddenly cease to work.
When the ship attempts to resume its course, the crew discovers it cannot as the Enterprise is caught up in a group of two-dimensional lifeforms.
Without her powers, Troi suffers a tremendous sense of loss, and goes through several classic psychological stages including denial, fear and anger. Ultimately, despite the reassurances of her friends, she resigns as ship's counselor, believing that without her empathic abilities, she cannot perform her duties.
Commander Data and Commander Riker realize the two-dimensional creatures are heading for a cosmic string, with the Enterprise in tow, and once they reach the string the ship would be torn apart. Realizing Deanna's loss and the ship's predicament are somehow linked, Captain Picard pleads with her to try and communicate with the strange creatures.
After attempting to warn the creatures of the danger posed by the cosmic string, Troi posits that they are seeking out the cosmic string in much the way a moth is drawn to a flame. Working from this hypothesis, Data simulates the vibration of a cosmic string at a position well behind the Enterprise. The simulations causes the creatures to briefly reverse their course allowing the Enterprise to break free.
Freed from the two-dimensional creature's influence, Troi's empathic ability is restored. She discovers that her powers were never lost, but were instead overwhelmed by the two-dimensional creatures' strong emotions. Troi returns to her old job with a renewed confidence.