Dr. McCoy's daughter was almost in a Star Trek episode — and would have had a romance with Kirk
The episode eventually aired with some significant rewrites, but the doctor's daughter was no longer in the script.
Anyone who's spent time with the crew of the USS Enterprise knows about Leonard "Bones" McCoy's troubled romantic history. While he's a Southern gentleman and a charmer around the ladies, his canonical backstory gives him a bitter divorce from an ex-wife back on Earth. And then there was that business with Natira in "For the World Is Hollow and I Have Touched The Sky", who he had to leave behind at the end of the episode.
Less explored onscreen is his daughter, Joanna. Joanna McCoy was finally canonized in the 1973 Star Trek: The Animated Series episode "The Survivor" and has been featured in extended universe novels. However, we almost got an episode focusing on Joanna and Dr. McCoy in the original run of Star Trek.
The book The Making of Star Trek, by Stephen E. Whitfield and Gene Roddenberry, was the very first officially licensed reference book on Star Trek. In fact, it was published in September of 1968, while the original series was still in production! Due to it being written while the series was ongoing, we can find references on episodes, plot points and characters that were planned to be introduced, but were changed before the actual episode was finished. One of these characters was McCoy's daughter.
"He has a twenty-one-year-old daughter, Joanna," the book says. "McCoy has properly provided for her well-being, hears from her as often as interstellar communications permits, but his duty aboard the Enterprise keeps them apart." The book goes on to explain that it was his unhappy marriage and subsequent divorce from Joanna's mother that first sent McCoy into the stars, looking for an escape from painful memories.
"In a future story we will bring McCoy's daughter Joanna aboard," Roddenberry said. "She will be a lovely girl, and Captain Kirk, of course, is going to be involved with her. Dr. McCoy is suddenly going to discover he is a father viewing Kirk from a father's perspective. An interesting and sometimes angry new McCoy-Kirk relationship will be seen."
The original episode, written by D.C. Fontana and called "Joanna", involved the Enterprise picking up a group of stranded "flower children", seeking a Nirvana planet. One of those flower children is Joanna (Fontana suggests that she could be played by Nancy Sinatra or Bobbie Gentry), who McCoy hasn't seen in years, and whose infrequent messages claimed that she was studying to be a nurse. Joanna argues that she has only seen her father three times since he left her mother, and he has no right to tell her what to do. She wants to be a musician, but McCoy doesn't approve.
Throughout the episode, McCoy and Joanna clash, and when Kirk is attracted to Joanna, McCoy warns him off, telling him that she's too much like her mother. "She'll cut your heart out and carry it around in a jar. She's no good!"
Eventually, once it's exposed that there is no Nirvana planet and the Enterprise crew gains control of the ship once more, Joanna and her father reconcile, and she reveals that she was thrown out by her mother for being too much like her father. Their relationship remains distant, but they begin to mend it. McCoy tells her that he will support her no matter what she chooses to do.
If that plot sounds vaguely familiar, it's because it was rewritten as the season three episode "The Way to Eden", known in the fandom as the "space hippies episode". Joanna was changed to Irina Galliulin, a Starfleet Academy drop-out, and the romantic interest shifted to Chekov instead. D.C. Fontana felt that the episode was so heavily rewritten that it no longer resembled her story and asked to be credited as her pseudonym, "Michael Richards".
As much as we would have liked to see more of McCoy's character and family explored, the rewrite was likely for the best. Kirk may have a pop culture stereotype as a womanizer, but going after one of his best friends' young daughter wouldn't have been a plot that aged very well over the years.