The former Monty Python legend was the author's first choice to helm Harry Potter and the Philosopher's Stone in 2000, and Warner Bros. bosses flew him out to Los Angeles to discuss taking on the project.
Gilliam insists he was convinced studio chiefs would never hire him, but still threw himself into the talks, and was left devastated when the deal inevitably fell through.
He tells Britain's The One Show, "J.K. Rowling and David Heyman, the producer, wanted me to do it. I was the pretty obvious choice... but I knew the studio would never hire me because they wanted a safe pair of hands, ones that would do what they wanted.
"I had a free trip first class out to L.A., which allowed me to do other work and I went to see the head of the studio... The thing that happened that made me ill, I went in there knowing I'm not gonna get the job, but they had to show due diligence - 'We talked to Gilliam', and find an excuse to get rid (of me).
"In the course of talking about what we could do, I got excited, I got them excited, and I walked out knowing I'm not getting the job. I drive for an hour and a half round Mulholland Drive just screaming, screaming that I allowed them to let me get excited."