Star Trek: 10 Things You Didn't Know About Dr Leonard 'Bones' McCoy
8. His First Appearance
It's well known that most of the main cast of the Original Series were replaced after the first pilot episode, The Cage. The ship's chief medical officer at the time was Dr. Phillip Boyce, who served under Captain Pike before M'Benga in Strange New Worlds.
Kirk replaced Pike in the second pilot episode, Where No Man Has Gone Before, and we also got the first appearances of Scotty and Sulu, but McCoy was still nowhere to be seen. In this episode, Kirk's chief medical officer was Dr. Mark Piper. It wasn't until the series got picked up by the network that we finally saw Bones for the first time.
Gene Roddenberry and others decided to replace Dr. Piper with McCoy because they felt that the role needed a somewhat younger actor. The first appearance of McCoy (along with Uhura and Janice Rand) was in the episode The Corbomite Maneuver, and he continued to serve aboard the Enterprise until the end of it's five-year mission, at which point he took a hiatus before jumping back into service in The Motion Picture.
Interestingly, DeForest Kelley was actually one of Gene Roddenberry's top picks to play the doctor in The Cage, but director Robert Butler suggested to go with John Hoyt instead.