In 2267, McGivers was serving as historian on board the USS Enterprise. She was acquainted with a number of other officers on the ship, including Pavel Chekov. (TOS movie, novelization & comic adaptation: Star Trek II: The Wrath of Khan, TOS novel: To Reign in Hell: The Exile of Khan Noonien Singh)
When Enterprise encountered the SS Botany Bay adrift in interstellar space, Captain James T. Kirk, Doctor Leonard McCoy, Lieutenant Commander Montgomery Scott and McGivers boarded the ship. The landing party discovered augmented humans encased in stasis chambers, and upon discovering Khan Noonien Singh in stasis, McGivers was immediately drawn to Khan.
After Khan was revived, McGivers attempted to debrief him and asked him about his past. She was quickly drawn to his passionate and powerful nature. Indeed, she was so taken with him that she painted his portrait. When Khan announced his intentions to take the Enterprise, she agreed to help him rather than face losing him. When she realized the enormity of what she had done, McGivers turned against Khan and his followers long enough to help Captain Kirk and the Enterprise and retake the ship.
Feeling that it would be a waste to commit Khan and his followers to a rehabilitation colony and perhaps realizing that Khan was too powerful to be entrusted to usual punishment methods, Kirk dropped all the charges against Khan and his followers, and allowed the augments to settle Ceti Alpha V. Kirk then told McGivers that she could either face a court martial, or could accompany Khan in his exile. She agreed to go with Khan, who accepted her as a superior woman. (TOS episode & Star Trek 2 novelization: Space Seed)
Six months after her exile to Ceti Alpha V, Khan and McGivers, along with many of the other colonists, were married. When Ceti Alpha VI exploded, the planet was devastated, and the colony on Ceti Alpha V barely survived the upheaval. McGivers was later killed by Harulf Ericsson, a jealous fellow superman, who placed a Ceti eel in her ear and directed her to kill Khan. She went back to the quarters that she and Khan shared and she pulled out a knife, about to kill Khan, but resisted at the last moment and stabbed herself in the chest, giving herself a mortal wound. When Khan asked why she did what she did, she barely managed to utter that Ericsson had planted an eel in her ear and that she had no regrets going with Khan. She then died and although Khan would ultimately gain revenge against Ericsson, her death was still one of the reasons that Khan sought vengeance on James T. Kirk for not checking on their progress. (TOS comic: "Khan: Ruling in Hell"; TOS novel: To Reign in Hell: The Exile of Khan Noonien Singh; TOS movie, novelization & comic adaptation: Star Trek II: The Wrath of Khan)
Years after Khan's death, Captain Kirk, Captain Spock, Doctor McCoy and Commander Hikaru Sulu returned to Ceti Alpha V in attempt to learn more about Khan's exile. In their search, they accidentally stumbled upon a sarcophagus for Marla that was built by Khan with Marla's mummified remains within. In another sarcophagus, likely meant for Khan, Spock found data tapes and records and Khan's personal journal. Before they left, the landing party was accosted by Ericsson's daughter and a few other surviving supermen and women who were exiled from the colony and demanded to know Khan's whereabouts, not knowing that he had left the planet and subsequently died. The young Ericsson also destroyed Marla's remains with a phaser she took from the landing party. Kirk managed to convince the young Ericsson that Khan was indeed dead and their fight was over. Kirk then instructed Sulu to go back to the Mutara Sector to beam her ashes into the debris field created when the Genesis Planet exploded, so that that she and Khan could at least be together. Kirk also hoped that (as husband and wife, they were reunited somewhere, somehow), Marla McGivers and Khan Noonien Singh had both finally found peace. (TOS movie, novelization & comic adaptation: Star Trek II: The Wrath of Khan; TOS movie, novelization & comic adaptation: Star Trek III: The Search for Spock; TOS novel: To Reign in Hell: The Exile of Khan Noonien Singh)