After casting McGregor as a lead in "Trainspotting", "Shallow Grave" and "A Life Less Ordinary", Boyle confessed that he let the star down for his fourth feature film "The Beach".
The 56-year-old filmmaker said he has since apologised to the actor for his behaviour, reoprted Digitalspy.
"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.
McGregor and Boyle have patched up since then. The actor will be returning for the "Trainspotting" sequel alongside other stars of the first film.