Bones was not the bad guy.
The final plot of "The City on the Edge of Forever" can be briefly summed up like this: In a bit of space turbulence, McCoy accidently injects himself with an excess of hallucinogenic medicine. The doctor goes mad, beams himself down to a planet. Spock, Kirk, Uhura and Scotty follow. The sick, crazy McCoy jumps through a portal in time, known as the "Guardian of Forever." As soon as he makes the leap, the Enterprise disappears. McCoy has altered the timeline, changing history. Our heroes are stranded. Their only option is to chase McCoy into the past and try to correct his meddling. It's cool, classic sci-fi stuff. But in the original script, the culprit in the crew was a member named Beckwith. He was the one who caused all the trouble. He was the one who jumped down to the planet and through time. And his character was unlike anything seen on Star Trek…
Beckwith was a drug dealer and a murderer.
Gene Roddenberry's vision of the future is utopian. All humans peacefully coexist. There was not even a need for money. Beckwith, however, was a shady fellow. Ellison argued that being cooped up on a ship for years was bound to make some people go stir crazy, or turn dark. The episode began with Beckwith pushing a drug called "Jewels of Sound" to a fellow crewmember named LeBeque. Beckwith ends up killing LeBeque, leading to his escape to a nearby planet, and back in time. NBC bristled at the notion of depicting drug use on television in 1967. Roddenberry refused to have an Enterprise crewmember be a bad guy. The entire Beckwith character was cut out, replaced by McCoy and his accidental "hypo" injection. While we appreciate the notion of a utopian future, it's only human to assume that some bad apples would sneak through. Heck, the main character of the new Star Trek series takes down her superior with a Vulcan nerve pinch and starts a war with the Klingons… in the first episode!
There was another main character named Trooper.
After jumping through the time portal, Kirk and Spock end up in 1930. There (well, then) Kirk meets and falls in love with Edith Keeler. Spoiler alert: She dies in a car crash. In the finished episode, McCoy saves her, which sets off a butterfly effect allowing the Nazis to win WWII. Edith is a pacifist, you see, and she leads a movement that keeps the U.S. out of the war. She must die for the future to be set right. Kirk struggles with the sacrifice…. Anyway, in the original script, Kirk and Spock are helped by an old WWI veteran named Trooper, who fought at Verdun. Poor Trooper died in the course of action. Ellison was quite fond of the colorful character, personally attached even, and was upset at his removal from the script.
There were space pirates!
After Beckwith jumps back in time, altering the future, the Enterprise does not merely disappear. It is replaced by a ship of marauders called the Condor, which pops up in orbit. This plot thread was presumably cut for budget reasons. Who needs an evil ship when you can just have the good ship vanish?
Oh, and the climax is entirely different.
In the final edition that we all know and love, Kirk makes the ultimate sacrifice. He finds true love in Edith, but must let her die to preserve the future. It's a iron-stoic cowboy act typical of iron-jawed hero types. Only, Ellison did not see it that way. In his script, Kirk was deeply in love. He could not let Edith go. He would rather see time itself shift than lose Edith. In the end, it is the logical Spock who holds back Kirk and prevents him from saving Edith's life. The powers that be refused to show such emotional weakness in the Captain. In our honest opinion, the anguish would have only deepened the character. Alas, Kirk's vulnerability was ahead of its time — and written out.
Beckwith is cosmically punished for his crimes.
Initially, Ellison envision Beckwith dying by firing squad. That was too heavy for Starfleet and quickly changed. Instead, an ending was whipped up in which Beckwith flees again, jumping into the time portal again, only to get stuck in a time loop in which he is killed over and over and over again.