When Voyager comes across a protostar, Janeway has samples of its photonic energy beamed aboard for study and possible use in power converters. After a small glitch, B'Elanna Torres corrects a breach in the transporter's containment field and safely finishes the samples' beam-in. But in calling Kim to assist her studies, she learns that ship sensors cannot detect him in the Holodeck or anywhere else aboard.

Tuvok and Chakotay enter the Holodeck to find no sign of Kim but discover his program still running: a version of the English epic poem "Beowulf." Confronted by characters from "Beowulf," they join in to fight the creature in the story and also disappear.

Rather than lose any more organic crewmembers, Janeway sends the holographic Doctor to unravel the mystery as his first away mission. Though he puts up a brave front, Kes gets him to admit he's unsure of himself and then offers encouragement, helping him select a name from an admired role model: Schweitzer. Once inside he begins to get the rhythm of the role but is uncomfortable with romantic advances from a female character, Freya, until she dies in his arms after taking a sword blow meant for him. Although both are holograms, he is clearly moved by her last word: his newly chosen name.

Inspired to try again, the Doctor realizes that an alien lifeform was snared in the energy samples taken earlier and, escaping through the field breach, retaliated by taking form in the Holodeck as the Beowulf monster and converting any Voyager crewmembers into energy. When the "sample" beings are returned to the alien, Kim, Tuvok and Chakotay all reappear — leading to a commendation from Janeway for the Doctor. He decides not to take the Schweitzer name because Freya died saying it.