Dave Mustaine wrote most of this song in just one sitting after learning that bass player Cliff Burton had died in a tour bus accident while traveling with Metallica on their Master of Puppets tour. While he was a member of Metallica from 1981-1983, Mustaine became good friends with Burton; he fondly recalls driving to practice, listening to Lynyrd Skynyrd, and smoking pot with him. Mustaine says that when he heard the news, he headed straight to downtown Los Angeles, where he bought heroin. He began crying, and through the tears came up with "In My Darkest Hour."
Burton's death was the inspiration for this song, but the lyrics are not directly about him, as the song is about remaining true to your friends and being there in their time of need. Mustaine didn't get a lot of support from his family, and also felt betrayed by Metallica when they kicked him out of the band.
Reflecting on the song, Mustaine explained that he treasures his relationship with his fans, who have shown him the kind of support he didn't get as a kid.
The song doesn't have a happy ending, but many Megadeth fans found it very helpful in getting them through difficult times, since it can be comforting to know that others have been through it.
The video was directed by Penelope Spheeris, who would later direct the film Wayne's World. Spheeris used the song in her 1988 documentary The Decline Of Western Civilization Part II: The Metal Years.