The episode starts with the Enterprise coming to the assistance of a science vessel, the USS Yosemite. Unable to beam over using the Enterprise's transporters, Lt. Barclay suggests linking the transporters on both ships; however, this means beaming one at a time with a lengthy dematerialisation/materialisation process. Barclay is assigned to the away team, and after watching Worf, Riker and Crusher confidently stride up to the transporter pad and beam over, he does the same. However, he steps off the pad just before energizing and leaves the transporter room.
Counselor Deanna Troi teaches him a Betazoid meditation technique, and with renewed confidence he goes back to the transporter room. Still nervous before transporting, Chief O'Brien relates that he was once afraid of spiders, and understands how Barclay feels. Barclay offhandedly mentions that he has never had a problem with spiders (in a later episode, "Genesis", Barclay de-evolves into a spiderlike creature). He beams over without incident, and assists La Forge. When beaming back he sees a wormlike creature in the matter stream in mid-transport, which moves toward him. Barclay deflects it with his arm, and when he materialises on the transporter pad he is unsure what has just occurred. When a check of the transporter reveals no anomalies, he convinces himself he must have been hallucinating and is suffering from transporter psychosis, an affliction that has not been seen in 50 years.
He becomes increasingly convinced he has the symptoms of transporter psychosis, forcing Troi to temporarily relieve him of duty. Wanting to be certain that he was hallucinating, he studies the log and with the help of O'Brien discovers that a surge occurred only during his transport, which might explain why only he saw something. He transports again and has O'Brien create the same surge again. He sees a creature in the beam, and again sure of himself, he calls a meeting of the senior staff to insist further investigation be taken.
He convinces Captain Picard that there may be a real problem with the transporter, and a more intensive investigation is done both on the transporter and on Barclay's physical condition. Barclay's arm is out of phase and he is carrying microbes not detectable by the transporter's biofilter. To cure him, the transporter's biofilter is modified and he is dematerialised for around 30 seconds. While in the beam he observes the creatures and grabs onto one of them just before materialising. On the pad a crewman from the Yosemite materialises along with Barclay. He deduces that the creatures were actually the missing crewmen of the science ship when he realized the number of creatures equaled the number of missing crewmen. They had been trapped inside the beam after an explosion occurred on their vessel during the transport. Worf and two other security officers transport after Barclay and successfully rescue the other crew members trapped in the beam.
The episode closes with Barclay and O'Brien meeting in Ten-Forward and striking up a conversation about how they each have dealt with their fears. O'Brien has even brought his pet spider, Christina, to share with Barclay. However, when O'Brien leaves the table Barclay displays some arachnophobia.