The directors of the film, said to the be biggest and most complex ever to be shot in the heart of the city, have revealed they "jumped at the chance" to use Edinburgh as a backdrop for the film.
The city's film commission has revealed the first details of the six-week production schedule, which has been agreed after more than a year's negotiations with executives at Marvel and Disney, who are making the Â£400 million film.
More than 400 crew members will be working on the film, which is expected to see stars including Robert Downey Jr, Chris Evans, Chris Hemsworth, Scarlett Johansson, Mark Ruffalo, Anthony Mackie, Jeremy Renner, Elizabeth Olson and Paul Bettanyshoot scenes in the city next month.
Several weeks of second unit filming, without the key cast members began on 22 March, while the first unit is expected to start work in mid-April.
The economic boom from the new Avengers film, which is being directed by brothers Joe and Anthony Russo, will dwarf the amount generated for the city's economy in 2016 when Danny Boyle's Trainspotting was filmed for several months in the city.
Joe Russo said: “When Edinburgh came up as a location option we jumped at the chance.
"The city is such a unique and iconic location, but one never seen as the backdrop for a big action film, which is incredibly exciting.”
Anthony Russo added: "“The support from all local agencies, such as Film Edinburgh, has been invaluable in helping to coordinate this complicated shoot.
“We appreciate the entire city’s help and are excited to have such a beautiful and historic city in the film.”
Cockburn Street and Waverley Station will be deployed as key locations in the film, which is expected to go on location elsewhere in the Lothians and into the Borders.
Rosie Ellison, manager of the Film Edinburgh commission, said: "This is the biggest production to ever film in the region.
"But crucially, it also clearly demonstrates Edinburgh has the infrastructure and process in place to accommodate major filming of this scale.
"Film Edinburgh and the Council have worked closely with the filmmakers for over a year to coordinate the smooth running of the location shoot in the region. The production team have been a pleasure to work with and have been considerate of the impact of filming on local business, visitors and residents.”
Gavin Barrie, economic development leader at the city council, said: “Our cobbled streets, historic properties and stunning green spaces could set the scene for some of cinema’s greatest superheroes and it is fantastic to secure such an A-list production.
"We know 40 per cent of visitors to the UK are attracted to places they have seen on screen and the Marvel franchise offers a huge opportunity to promote Edinburgh all over the world. This is fantastic news for the city and our film industry.
"The council will do all it can to support Film Edinburgh and the producers and keep the city moving throughout the shoot.”
Last year was the most successful on record for the Film Edinburgh commission, with Trainspotting helping to boost the value of productions to Â£7.7 million.