“The Passenger” is episode nine of season one of Star Trek: Deep Space Nine.
Doctor Bashir and Major Kira are returning to DS9 from somewhere, presumably in the Alpha Quadrant, in a runabout when they receive a distress message.
On following up the signal, they find a ship in distress. There were three people on board. One is dead, one is dying, and the final one is injured.
The dying person, who dies whilst they are there, was a criminal who had been tracked for years by the sole survivor. He had been guilty of doing anything at all in order to stay alive, doing hideous experiments on others in order to do so.
DS9 is expecting a delivery of duranium, and this is something vital for the dead criminal’s race. The security officer who tracked him down is reluctant to believe he is dead, and it turns out she’s right. Before dying, he transferred his mind to another – and it turns out that Doctor Bashir was the one he transferred it to.