Soon-to-be "American Idol" judge Randy Jackson assisted Carey, Jam, and Lewis in the song's production. In an interview with MTV, Carey described the single and its conception:  "I started doing different charity events where I did a combination of 'Never Too Far' and 'Hero'. We made it into a medley and put them in the same key and made it work. People responded really well to it. It's been interesting for me, since the events of September 11, the way people have been playing 'Hero' and really even talking to me about 'Never Too Far', 'cause that song is also about loss. I figured that it would be a nice thing to do, to put them both out for Christmas. There's also an unreleased track on the B-side, which is called 'There for Me' which kind of has the same sentiment. The proceeds from 'Never Too Far' and 'Hero' and 'There for Me' are going to go to the Heroes Fund, and it's going to benefit police officers' families, relief workers' families." The song's B-side, titled "There For Me", was a leftover track from Carey's "Rainbow" (1999), which she wrote alongside David Foster and Diane Warren. After Carey abandoned work with longtime collaborator Walter Afanasieff, she began working with Foster throughout "Rainbow". During their many creative meetings, Foster introduced Carey to Warren, a songwriter with whom he had collaborated several times in the past. Throughout the process of writing and producing the song, the female pair did not work well with each other, as Carey accused Warren of repeating lyrical phrases too often, while Warren did not agree with some of Carey's production choices. After they completed the song, Carey wrote two other ballads with Warren for "Rainbow", entitled "After Tonight" and "Can't Take That Away (Mariah's Theme)". "Never Too Far/Hero" is a mid-tempo ballad, drawing influence from pop and R&B music genres. The song was written and produced by Carey and Walter Afanasieff, Jimmy Jam and Terry Lewis and Randy Jackson, and was released as the lead single from her second compilation album, "Greatest Hits" (2001). It incorporates music from several musical instruments, including the piano, guitar and organ. According to the sheet music published at Musicnotes.com by Alfred Music Publishing, the song is set in common time with a moderate tempo of 62 beats per minute.