Science-fiction author George Clayton Johnson, who wrote several episodes of The Twilight Zone as well as the first episode of The Original Series that was aired — “The Man Trap” — pitched another Star Trek episode that was never made.
In “Rockabye Baby, Or Die,” completed on August 2, 1966, an alien entity infiltrates the Enterprise computer and grows into adulthood considering Kirk a father figure. Producer Gene L. Coon rejected the story.
The Enterprise is on its way to the planet Minerva to pick up two criminals, both hopelessly insane, for transport to an asylum world. As they approach the planet, a strange light globe collides with the ship. The intercom comes on and everybody on board can hear the sound of a baby crying.
A search of the ship reveals no child. Spock is the one who comes up with the answer: the ship itself is the child! The light force was some kind of entity that has integrated itself with the Enterprise computer. Spock is fascinated, but Uhura is far from happy because all of her channels are filled with the sound of a crying baby.
The “baby” is starting to grow, and quickly. Doors open and close, the turbolifts move by themselves. The creature is learning how to “walk”. It is becoming self-aware, but the crying is getting on everyone’s nerves. Uhura suggests they treat the ship as if it were a real child and she sings the entity to sleep. Spock and Scotty track down the entity within the ship’s computer and discover it is located in the core itself. They cannot isolate the “baby” without cutting off life support and main power.
As the ship approaches Minerva, the child wakes up. It takes over navigation of the ship and moves it toward the sun, which it considers “pretty”. Unless Kirk can regain control of the Enterprise, the baby will “crawl” right into the star!
Kirk orders the controls that connect the computer to engineering to be manually severed. As a work team does this, though, the ship starts disobeying commands. The baby is having a tantrum. The heat from the sun is rising. The crew is beginning to collapse as the cooling systems start to overheat. Kirk now orders the outer hull to be electrified. This succeeds in teaching the child that every time it moves toward the sun, it will be hurt.
Spock informs Kirk that the captain would appear to be the father of the child, and the growing intelligence begins to ask questions of Spock. It keeps asking “why?” like a child. But it won’t allow the ship to reach Minerva. Kirk and McCoy try to beam down, but the child will not allow Kirk to leave. It is scared of being left alone. Kirk explains to the ship that he must go and promises that he will be back soon. The baby relents.
On the planet, Kirk and McCoy are given custody of the two murderers, Nolan Russell and Ray Francis. The inhabitants of Minerva look something like bipedal crocodiles, and the two killers had attempted to wipe them out. They were restrained by the other humans on the planet and some were injured. McCoy stays to treat their wounds while Kirk beams back up with Russell and Francis.
They are placed in the brig, where they hear a child’s voice asking them why they are locked up. Taking their chance, both men lie like crazy, trying to convince the child that they are the victims of the Minervans, who have lied to Kirk and fooled him. The baby believes them and lets them go. The killers overpower a crewman and take his phaser. They find Kirk in the transporter room and Russell is about to kill him when Francis realizes that a Starfleet captain is far more valuable to them alive than dead. They can use him to force the Enterprise to take them to another world where they can escape. On the bridge, Spock has no option but to obey their commands to save Kirk’s life.
The baby realizes it has been fooled. It takes over the helm, and starts to plunge the Enterprise back toward the sun. It tells the criminals that if they do not surrender, it will burn up the ship and them with it.
The heat gets to be too much until all but Spock are fainting. The maniacs finally surrender, but by then the Enterprise has approached too close to the sun and cannot escape its gravitational pull.
The ship burns every circuit, adding all of its power to the effort to escape. It finally drags free of the tremendous gravity field, but the effort has weakened the alien creature. It has just enough energy to spare to ask Kirk if it did well. “I’m proud of you,” he replies. The child then departs the ship and Spock is convinced it is dead. But in that moment, McCoy is delivering a child on Minerva. The newborn cries — in the same tones the ship had been using.