"Can I cook or can't I?"
- - Carol Marcus boasting about her scientific achievements, 2285
Doctor Carol Marcus was one of the leading molecular biologists in the Federation. She was once romantically linked to noted Starfleet officer James T. Kirk – a relationship from which she bore a son, David Marcus – but she opted to devote her life to her research and to mothering David.
It was during the late 2250s or early 2260s when Carol Marcus became involved with Kirk. Though she gave birth to their son, David, Carol felt that she and Kirk had no basis for a lasting relationship, with Kirk traveling around the universe while she worked in a lab, so she asked that Kirk leave her alone to raise the boy. That they both cared more for their careers than they did for each other was never disputed. As Carol saw it, she and Kirk lived in entirely different worlds, and she wanted her son to be raised in hers. Indeed, Carol kept much information about Kirk withheld from their son, such as her request that Kirk stay away from both herself and David.
Carol continued with her work, enjoying much success. In 2284, she proposed the most ambitious and potentially dangerous of her plans to the Federation, dubbed "Project Genesis". Once her proposal was accepted for Federation funding, she began a three-stage development process, accompanied by a highly skilled team of scientists which included her son, Dr. David Marcus.
She and her team made remarkable progress and, by 2285, they were ready to try out their new invention. However, before they could find a suitable planet on which to test the Genesis Device, Khan Noonien Singh and his band of "supermen" intervened, bringing Kirk back into her and David's life.
Though she didn't share her son's mistrust of Starfleet, she was incensed when told that her project and all her files were to be taken by the crew of the USS Reliant, under orders of the new Admiral Kirk. She was determined to fight this unexpected incursion into her territory, though she was willing to give her former lover the benefit of the doubt. When it turned out to be Khan, not Kirk, who stole the Genesis Device, she gratefully accepted Kirk's assistance.
Throughout the quest to save the device from Khan's evil plans, it was apparent that, although Carol Marcus still felt affection for Kirk, her true love was her work. Even as havoc was erupting all around, she gazed on the glory of the Genesis Planet forming exactly as her specifications and years of research had indicated it would. The Genesis Project appeared to be a success, and her pride in her work was unmistakable.
The encounter with Khan gave Carol the opportunity to tell David who his father was and to mend some old wounds between her and Kirk. (Star Trek II: The Wrath of Khan) When her son was later killed by Klingons on the Genesis Planet, Carol was left with her projects and her research, the life that had sustained her for many years. (Star Trek III: The Search for Spock)
Almost a century later, in 2374, Captain Kathryn Janeway referred to Dr. Marcus in her captain's log, when Janeway was in search of the omega molecule and found herself having to face enforcing the Omega Directive. In her log, she noted that, in spite of her apprehensiveness, she now knew how Carol Marcus must have felt when she developed the Genesis Device, watching helplessly as science took a destructive course. Janeway, however, noted that, unlike Marcus, she had at least chance to prevent it from happening. (VOY: "The Omega Directive")
The notion that gradually transformed into the character of Carol Marcus was incorporated into the plot for Star Trek II as early as the first story treatment written for that film. In this one-page story outline (written by Executive Producer Harve Bennett), Admiral Kirk personally responded to news of a colonial rebellion on a Federation planet specifically because his former relationship with this unnamed woman personally connected him to a leader of the revolution, their son. The plot, in this earliest of its forms, also involved Kirk rescuing the woman from a drifting spacecraft, bringing her aboard the Enterprise, before proceeding to the planet. (The Making of Star Trek II: The Wrath of Khan, pp. 35-36)
The character of Kirk's former lover then received the name Diana, in a nineteen-page outline that Jack B. Sowards went on to develop from Bennett's single-page treatment. She was again rescued by the Enterprise from a refugee ship that originated at the planet undergoing revolution, this time named as Omega Minori IV. However, it was established that she had never informed Kirk of the fact that, as a result of their prior relationship, she now had a son, a fact Kirk nevertheless learned during the course of the adventure. (The Making of Star Trek II: The Wrath of Khan, pp. 37-39)
Subsequent early drafts of Star Trek II featured Dr. Janet Wallace from "The Deadly Years" in the role of Kirk's old flame. Near the start of the next story outline, she sent a personal call to Kirk while both were on Earth, saying that she could use a visit from an old friend. Wallace thereafter intermittently told Kirk and their son that they were related to one another, easing tensions between them. She also traveled to Omega Minori IV herself, shortly before her revelation to David that Kirk was his father. (The Making of Star Trek II: The Wrath of Khan, pp. 39-42) This version of the character remained much the same in the film's first script draft, written by Jack Sowards. She was again reduced to hiding in caves with David and the other rebels but also had some significant interplay with Kirk. (The Making of Star Trek II: The Wrath of Khan, p. 45)
In an updated script draft which Sowards submitted, the role that Janet Wallace fulfilled in the story had been replaced with a new character named Carol Baxter. (Star Trek: The Magazine Volume 3, Issue 5; ) While still to undergo some degree of final revision, the character was by now much as it is in the film's final version. (The Making of Star Trek II: The Wrath of Khan, pp. 37-39)
The filming script for Star Trek II describes Carol Marcus as being "in her early forties, attractive and intelligent." The same script draft also states that, at the time she recorded the visual footage in which she proposed Project Genesis, she was "not used to" appearing on-camera. 
It has been suggested (such as in the Star Trek Chronology, 1st ed., p. 151 & 2nd ed., p. 268) that a "little blonde lab technician" mentioned in "Where No Man Has Gone Before" may, in fact, have been Carol Marcus. As depicted in the episode, Kirk almost married this female, after an initial encounter between them was arranged by Gary Mitchell (unbeknown to Kirk) while both males were studying at Starfleet Academy together. Of course, this unnamed character also could have been Janet Wallace or some other woman never shown on-screen. Although Michael and Denise Okuda (the writers of the Star Trek Chronology) recognize that the reference might actually be to Carol, they also consider that, given the amount of romantic relationships that Kirk had in his lifetime, it is not surprising that Carol was never heard of (at least not directly) before appearing in Star Trek II. (text commentary, Star Trek II: The Wrath of Khan The Director's Edition)
Upon seeking a suitable actress to play Carol Marcus, director Nicholas Meyer had two precise goals in mind. He later explained, "I wanted a woman who was beautiful and looked like she could think; a woman who was attractive enough that you could see why Kirk would fall for her, and at the same time somebody who could keep up with him." (Star Trek: The Magazine Volume 3, Issue 5; ) Meyer also said of the role, "I felt that, if it was to be any kind of meaningful or long-lasting or memorable relationship, she had to have more than just looks. She had to be intelligent." (audio commentary, Star Trek II: The Wrath of Khan The Director's Edition/Blu-ray)
Ultimately, Carol Marcus was played by actress Bibi Besch. Nick Meyer was satisfied with this casting decision, believing that Besch fit both necessities for the role, saying of the performer, "She has a face where you can see all the thoughts flitting back and forth." (audio commentary, Star Trek II: The Wrath of Khan The Director's Edition/Blu-ray)
Bibi Besch approached her performance of Carol Marcus on a very basic human level but also as an acting exercise, attempting to make it as realistic and therefore believable a portrayal as she could. "I tried to make it as human as possible," remembered Besch, "rather than trying to fit into something that already was because this character hadn't existed before and I didn't really feel that I had to do that [....] It's difficult to play a woman who has had a relationship with someone that everybody knows. So I tried to make it believable for myself. I fantasized about an early affair [between Kirk and Carol Marcus] and why it turned out the way it did. What kind of people we both became, how I got to be where I was, not just as a scientist but as a woman who wouldn't have told Kirk for all those years that he had a son." (The Making of the Trek Films, 3rd ed., p. 171)
Bibi Besch struggled, somewhat, with relating to a few aspects of Carol Marcus' persona. "I don't know what it's like to be a scientist or to live in the future," she mused, "There's no way for me to do any research on that." Even so, she was able to draw on personal experience, since she had been a single parent while having a career, to better understand the role. In this way, she intended to make the part believable to herself, thereby enabling her to engender a realistic portrayal for viewers. (Starlog, issue #153, pp. 54 & 55)
The first day on which Bibi Besch portrayed Carol Marcus involved the character arriving on the bridge of the Enterprise and overseeing the forming of the Genesis Planet. All other scenes in which Carol Marcus appears were filmed later. (text commentary, Star Trek II: The Wrath of Khan The Director's Edition)
Bibi Besch felt that, as written for Star Trek II, the role of Carol Marcus was quite limited, even including the details of her past romance with Kirk. "There was a little bit more about our relationship that didn't end up on the screen. But not much, really. It was sketchy to begin with," the actress related. "Sometimes, I think of my character as just a lot of exposition–a means of getting to the plotline. I would love to do a future Star Trek with a little more exposition." (The Making of the Trek Films, 3rd ed., p. 171)
Carol Marcus was omitted from Star Trek III: The Search for Spock, because Harve Bennett decided not to use her in the story, as a cut-back to that film's budget. (Trek: The Unauthorized Story of the Movies, 3rd ed., p. 87) Though Bennett originally included Carol in the story outline for the movie (later saying, "I thought it might be fun to have her relating to David and have something going with Saavik"), he subsequently deemed the character extraneous to the story and had some difficulties with how to logically account for her having known about David Marcus using unstable protomatter in the Project Genesis matrix. Thus, Bennett not only excised Carol from the third film but also imagined that she had no knowledge of her son's use of protomatter in the matrix. (The Making of the Trek Films, 3rd ed., p. 46)
The exclusion of Carol Marcus from Star Trek III was initially very difficult for Bibi Besch to accept. (The Making of the Trek Films, 3rd ed., p. 46) She couldn't understand why the character wasn't even in the movie's script when she first read it. (Starlog, issue #153, p. 55)
According to Harve Bennett, Bibi Besch sent a letter of acceptance to him once she viewed Star Trek III, shortly after its release. Bennett stated about the message, "It said, 'I've seen the picture. Now I understand. You were right. I hope you can find a place for me in one of the other films.'" (The Making of the Trek Films, 3rd ed., p. 46)
Comments made by Bibi Besch, several years after Star Trek III was released, seem to suggest that she remained or returned to feeling frustrated about not having been in that film. She said, "I feel disappointed that I never got a chance to complete my relationship with Jim Kirk vis-a-vis the death of our son [....] It would have been nice to have been able to mourn with the father, Kirk; there was nothing with them together [in the film], and that's too bad." On the other hand, she did admit to subscribing to one theory about her role's exclusion from the third film, remarking, "My sense about it was that they need to keep Captain Kirk unencumbered in any way [...] [because] it's part of the Kirk mythology that he be the Lone Ranger out there, by himself, battling the elements." (Starlog, issue #153, pp. 53 & 55)
Despite hoping to someday make a return appearance as Carol Marcus and "tie up a few loose ends between Carol and Kirk," Bibi Besch was fundamentally honored to have played the part. She reflected, "I feel like I'm part of this history now, having done this character [....] After all this time, [Carol Marcus' popularity] is incredible." Besch also received many items of merchandise in which the character featured. (Starlog, issue #153, pp. 64 & 54)
Carol Marcus appears in the Star Trek: Vanguard novel series, set shortly before and during the early part of the original series and centered around Starbase 47, code-named "Vanguard" (Vanguard (station) at Memory Beta, the wiki for licensed Star Trek works). Dr. Marcus was assigned as the civilian chief scientist of the Vault, a top-secret laboratory at Vanguard established following the discovery of the Taurus meta-genome (Taurus meta-genome at Memory Beta, the wiki for licensed Star Trek works). The series implies that the research into the meta-genome provided the basis for Project Genesis. Her mirror universe counterpart appears in a similar position in The Sorrows of Empire.
In the novelization of Star Trek III and Star Trek IV, the relationship between Kirk and Carol breaks down when she discovers Starfleet's intentions to hush up information about Genesis – something Kirk had nothing to do with. She elects instead to pay condolence calls on the families of the Regula One staff that were murdered by Khan. It is during one of these visits that she is informed of David's own slaughter.
At the beginning of the Star Trek VI novel, Carol is visiting one of the families again on the Themis colony (presumably over fifteen years after the Genesis incident) when it is attacked by Klingons – presumably General Chang, using the prototype Bird-of-Prey that will later cause the Enterprise crew trouble. Carol is severely injured and on life support, news which affects Kirk deeply; over the years, he and Carol had healed the rift over David's death and became friends again, and they were planning on making a life together after his retirement. For this reason, his hatred of Klingons is even more extreme in the novel than in the movie – not only did they kill his son, they may have also killed his future life partner.
In William Shatner's novel The Ashes of Eden, Carol and Kirk are initially shown living together in Kirk's San Francisco apartment. However, their relationship seems strained due to Kirk's restlessness regarding his retirement. He ultimately decides to join the Klingon/Romulan hybrid Teilani on a mission to her homeworld, leaving Carol behind.
During the Genesis Wave series, it is revealed that Carol is still alive well into the twenty-fourth century, having been concealed on a distant planet during the Dominion War to prevent her knowledge from falling into the wrong hands. Despite the precautions taken to secure information about the Genesis Project, Carol is captured by a race of sentient plants capable of creating mental illusions, who trick her into creating the "Genesis Wave", a wave of energy that terraforms all planets in its path into something that can be inhabited by this species. However, Carol manages to shake off their illusions during a brief period of illness, and, accompanied by Maltz – the sole Klingon survivor of the original Genesis catastrophe – she destroys the space station that would have launched a second Genesis Wave, both she and Maltz dying in the process.