While the Federation starship Enterprise, under the command of Captain Jean-Luc Picard, investigates the asteroid-laden sector of space of the final battle between the Menthars and the Promellians, it receives a distress call from a Promellian battlecruiser: Captain Picard directs the ship to investigate. They find the battlecruiser adrift but intact, and Picard, anxious to see the ship for himself, joins the away team as they transport over. They find all the crew long dead at their posts, while a recording by their captain suggests the ship was caught in a Menthar trap. With their investigation complete, the away team returns to the Enterprise to continue on, when they begin to suffer a series of power losses that prevent the use of either impulse or warp drive, and are bombarded by radiation against which their shields cannot provide protection. Picard orders Chief Engineer La Forge to find a way to restore power while a second away team searches for more clues on the Promellian vessel. They discover that the Menthars had previously used aceton assimilators to absorb an enemy ship's energy and redirect it back as hazardous radiation, and that the Enterprise is stuck in the same trap.
La Forge realizes that the only way to restore power is to reconfigure the warp drive and traces its design back to the Enterprise's construction and blueprints created by Dr. Leah Brahms. La Forge uses the ship's holodeck to create a simulation of Dr. Brahms to help him figure through the engine reconfiguration. As he does so, he encourages the computer to inject personality into the simulation and slowly gains romantic feelings for Dr. Brahms. Despite the simulation's help, La Forge is unable to find a way to safely maneuver the Enterprise away, and when Picard orders all extraneous power systems, including the holodeck, shut down to conserve power, La Forge convinces him to allow the holodeck to continue to run. After power is restored to the holodeck the simulated Dr. Brahms recognizes a solution which is to allow the computer to take control of the ship, allowing it to make rapid adjustments to compensate for the trap. La Forge then finds an alternate solution to the problem which is to completely reduce the power output from the Enterprise and maneuver it out of the field by manual control with only two thrusters. Picard and La Forge decide that computers cannot account for human intuition and elect to go with the manual approach. Picard takes the helm himself to skillfully carry out the operation, successfully moving the Enterprise from the trap. Once free and with power restored, the Enterprise fires photon torpedoes to destroy the Promellian craft and the asteroids around it to prevent others from falling into the trap.
"Beyond the Farthest Star" - an episode of the animated Star Trek series where the heroes' ship is trapped near an ancient dead ship (which is explored by an Enterprise captain) which provides clues about their situation.