Ben E. King recorded this shortly after leaving The Drifters in 1960. It gave him a solid reputation as a solo artist.
"Stand By Me" was the name of a gospel hymn written by the Philadelphia minister Charles Albert Tindley in 1905. His hymn became popular in churches throughout the American south and was recorded by various Gospel acts in the 1950s. The most popular adaptation was by The Staple Singers, who recorded it in 1955. It was this version that Ben E. King heard; he pushed The Drifters to record it, but the group's manager rejected it.
After leaving The Drifters, King auditioned for the legendary songwriting team of Jerry Leiber and Mike Stoller, singing a few popular songs before doing what he had of "Stand By Me," which was just a few lines of lyrics with some humming to fill in the words. He agreed to collaborate on the song with Leiber and Stoller, who gave it a more contemporary sound and polished it into a hit. The bassline at the beginning was Stoller's idea.
The song was credited as being written by Leiber, Stoller and King. Charles Albert Tindley, who composed the original hymn, was left off the composer credits as his work had been sufficiently transformed. This wasn't the first time Tindley was omitted from the credits of a song he originated: he also wrote a song called "I'll Overcome Someday," which eventually became "We Shall Overcome