And the director, who was responsible for last year's acclaimed London 2012 opening ceremony revealed that he has since apologised to McGregor - who he had previously worked with several times - for going back on his word to cast him in the movie.
Speaking on The Jonathan Ross Show this evening, Boyle says: "We didn't treat him very well, I've got to be honest about it, we didn't behave at our best.
"You learn and we've apologised. We made this film called The Beach, and we gave Ewan the impression we were going to cast him in it and we didn't cast him in it, we cast another actor, a wonderful actor Leonardo DiCaprio, who was a lovely guy, they're both wonderful."
And he went on to explain that at the time he had thought he was becoming a big shot, but had since realised the error of his ways.
"You think you're moving up, it's the illusion that you think you're moving up, therefore you're going to need a bigger star to sell the movie. You learn to stick with your roots."
He also discusses the planned sequel to Trainspotting, the hit 1996 movie in which he directed McGregor.
"It's going to look at the same actors playing the same parts but 20 years later.
"Like a 7 Up, 14 Up, 21 Up, I always find those things amazing. Seeing time pass with people that you're familiar with.
"I think to see (Ewan) go back to Renton, to see Bobby Carlyle go back to Begbie, I'd like to see that."
And he reveals that he hopes to give the movie the title T2 - if they can get permission from the creator of the Terminator movies.
"We're going to try and do T2, if James Cameron will let us use that title."
Watch MTV News on the hour every hour on MTV - Sky Channel 126 and Virgin Channel 134