When Marvel Studios first announced its intention to produce its own superhero movies, Ant-Man was one of the initisl projects to attach a writer and director and begin development. Ironically, Ant-Man would ultimately become one of the most troubled Marvel Studios productions not because it languished in development hell, but because the Marvel Cinematic Universe machine changed so significantly by the time Edgar Wright was finally ready to realize his passion project. This is the story of how Ant-Man survived a last-minute exit from its writer and director and came out the other side a viable MCU franchise.

Wright’s involvement in Ant-Man actually predates the creation of Marvel Studios, as he and Joe Cornish—who would go on to write and direct Attack the Block—wrote a treatment in 2003 for Artisan Entertainment, who at the time held the rights to the character:

“We wrote this treatment revolving around the Scott Lang character, who was a burglar, so he could have gone slightly in the Elmore Leonard route, and they came back saying, ‘Oh, we wanted to do something that was like a family thing.’ I don’t think it ever got sent to Marvel.”

Wright subsequently ran into Marvel’s Kevin Feige and Avi Arad as Marvel Studios was forming, and the two asked the Shaun of the Dead filmmaker if he had any interest in any Marvel titles. Wright then showed them the treatment he and Cornish wrote for Artisan, and that then served as the basis for Wright and Cornish’s Marvel Studios script.

Wright’s Ant-Man was announced as one of Marvel’s initial films alongside Jon Favreau’s Iron Man, Thor, and Captain America. In fact, Wright even appeared at 2006 San Diego Comic-Con alongside Favreau to tease Ant-Man while at the same time hosting a panel for his then-upcoming film Hot Fuzz. And even way back then, he had the bones of the story for what eventually became the finished Ant-Man movie:

“The idea that we have for the adaptation is to actually involve both [Scott Lang and Hank Pym]. Is to have a film that basically is about Henry Pym and Scott Lang, so you actually do a prologue where you see Pym as Ant-Man in action in the 60’s, in sort of Tales to Astonish mode basically, and then the contemporary, sort of flash-forward, is Scott Lang’s story, and how he comes to acquire the suit, how he crosses paths with Henry Pym, and then, in an interesting sort of Machiavellian way, teams up with him. So it’s like an interesting thing, like the Marvel Premiere one that I read which is Scott Lang’s origin, it’s very brief like a lot of those origin comics are, and in a way, the details that are skipped through in the panels and the kind of thing we’d spend half an hour on.”

Wright completed his first draft of the Ant-Man script in 2008, but there was no pressure to get the film going ASAP given that the character, well, wasn’t exactly a top priority for Marvel Studios. They were busy trying to get their Phase One movies off the ground—Iron Man, Thor, Captain America—and build to The Avengers, so Wright continued to work on Ant-Man in between other projects.

By 2011, Wright and Cornish had delivered a second draft of Ant-Man to Marvel after Wright completed his film Scott Pilgrim vs. The World, and it seemed as though the stars were finally beginning to align to get Ant-Man made at long last. In May 2012, as Marvel was readying the release of The Avengers, Wright was being enlisted to visualize what Ant-Man would look like on film.

Indeed, in June of 2012, Wright shot a test reel for Ant-Man, showing how he would capture the character’s shrinking powers onscreen. As we later discovered, Marvel was actually eyeing Ant-Man was one of its Phase Two movies, but allowed Wright to delay production so he could instead make his original sci-fi film The World’s End first. You see, Eric Fellner—producer for Working Title, the studio behind Wright’s Cornetto Trilogy of films—was diagnosed with cancer, and Wright felt it important to fulfill his promise of a trilogy of movies for Fellner lest the producer’s condition worsened. Thankfully, Fellner recovered and The World’s End stands as one of Wright’s best films.

So Wright showed off the Ant-Man test reel during the Marvel panel at 2012 San Diego Comic-Con, a month after he shot it, which ended up being the only footage Wright ever shot for Ant-Man that was seen by the public. I was thankfully in the audience that day, and I can attest it was just as exciting and inventive as you imagine it to be.

So with his proof-of-concept complete and essentially a greenlight from Marvel, the filmmaker went off and shot The World’s End in the fall of 2012, and by July 2013 Wright and Cornish had a completed version of the Ant-Man script ready to roll. With The World’s End finished, Wright now turned his attention to making Ant-Man as his next movie. That’s when the trouble began…

While the Marvel Cinematic Universe was in the midst of expanding, Wright envisioned Ant-Man as a standalone story:

“In the time I’ve been working on it other things have happened in the other movies that could be affected in this. It is pretty standalone in the way we’re linking it to the others. I like to make it standalone because I think the premise of it needs time. I want to put the crazy premise of it into a real world, which is why I think Iron Man really works because it’s a relatively simple universe; it’s relatable. I definitely want to go into finding a streamlined format where you use the origin format to introduce the main character and further adventures can bring other people into it. I’m a big believer in keeping it relatively simple and Marvel agrees on that front.”

By October 2013, casting had begun and Marvel had staked out a July 2015 release date for the film. Marvel and Wright had narrowed their Scott Lang search down to Joseph Gordon-Levitt and Paul Rudd. Reportedly, it was Wright who wanted Rudd while Marvel favored Gordon-Levitt, hoping to inject some more youth into the MCU.

By December, Rudd had officially won the role, all the while production had to be moved from the UK to the U.S. due to a lack of stages. The next month, Michael Douglas signed on to play Ant-Man originator Hank Pym in what Wright and Feige described as a heist story, with Pym passing the Ant-Man mantle down to thief Scott Lang.

Casting continued as Michael Peña signed on, Evangeline Lilly entered talks to play Pym’s daughter, and Corey Stoll entered talks to play an unspecified role. But with filming due to get underway in July 2014, tensions began to arise between Wright and Marvel. Throughout early 2014, Wright and Cornish wrote two additional drafts of the Ant-Man script attempting to address Marvel’s notes without compromising their vision. Marvel even pushed the start of filming back from June to July to make time for the rewrites.

When the script still wasn’t to Marvel’s liking, the studio commissioned a rewrite from some of its in-house writers, without Wright’s input. It was when that draft of the script came back—reportedly lacking in Wright’s voice and entirely homogenized—that Wright decided to leave the film. This was May 23rd, roughly two months before filming was due to begin.

Years later, Wright reflected on his exit and confirmed that the studio commissioned a draft of the script without his involvement:

“I wanted to make a Marvel movie but I don’t think they really wanted to make an Edgar Wright movie. I was the writer-director on it and then they wanted to do a draft without me, and having written all my other movies, that’s a tough thing to move forward thinking if I do one of these movies I would like to be the writer-director. Suddenly becoming a director-for-hire on it, you’re sort of less emotionally invested and you start to wonder why you’re there, really.”

In the summer of 2014, Feige claimed they simply found out too late that Marvel and Wright weren’t a good fit: