"Heartbreak Hotel" was written by Mae Boren Axton and Tommy Durden. (Elvis Presley
is listed in the songwriting credits as well, but it is widely acknowledged that he didn't participate in writing the song.)
The inspiration for the song came when Durden found a newspaper article about a suicide. The victim had left a suicide note that read, "I walk a lonely street." Axton suggested that they put a heartbreak hotel at the end of that street, and within 22 minutes they had written the song and recorded a demo.
Presley's recording was released on January 27, 1956, and was hugely successful. The song spent eight weeks at #1 on Billboard's Best Seller chart (the Hot 100 didn't exist yet) and a whopping 17 weeks at the top of Billboard's country chart.
source: The Billboard Book of #1 Hits, Fred Bronson