In March 2014, Brian Tyler signed on to compose the film's score, replacing the composer for the first film, Alan Silvestri, while also marking his third film collaboration with Marvel following Iron Man 3 and Thor: The Dark World in 2013. Tyler stated that the score pays homage to John Williams' scores for Star Wars, Superman, and Raiders of the Lost Ark and references the scores for the Iron Man, Thor and Captain America films in order to create a similar musical universe, saying, "That’s the goal for sure. You have to build in nostalgia and do it upfront so you can relate to it." Danny Elfman also contributed music to the score, using Silvestri's theme from the first film to create a new hybrid theme.
In April 2015, Marvel released the track listing and announced that the soundtrack would be released digitally on April 28, 2015 and on physical media on May 19, 2015. The following day, a bonus track composed by Elfman, titled "New Avengers-Avengers: Age of Ultron", was revealed.