The Trainspotting star said he was keen to make an “indie, grungy, contemporary movie” in his home country after going behind the camera for the first time to direct an adaptation of the novel American Pastoral.
The Perthshire actor said he could imagine making his next film in either “urban Edinburgh” or in the Highlands if he could find the write story.
Hundreds of free tickets were given away for the screening at the Filmhouse - a special event organised by the Edinburgh International Film Festival.
McGregor said he was hoping to be back in Scotland in January for a premiere of the much-anticipated sequel to Trainspotting.
The 45-year-old, who got his acting break with Perth Youth Theatre, said he would also consider working with the National Theatre of Scotland in future.
McGregor stars in the film - an adaptation of Philip Roth’s Pulitzer Prize-winning novel - alongside Jennifer Connelly and Dakota Fanning.
He plays a father whose seemingly perfect life is torn apart when his teenage daughter goes into hiding after she is accused of an act of political terrorism in 1960s America.
McGregor has made a string of visits to launch new films since Shallow Grave was shown at the film festival in 1994, including Velvet Goldmine, Young Adam, Perfect Sense.
He said he had made a special request to the producers and distributors of American Pastoral for a “Scottish premiere” and would be keen to return as soon as possible for his next role behind the camera.
McGregor said: “American Pastoral was an amazing opportunity for me, I loved it very much and I am very proud of it. It was the film I wanted to make.
“But it feels a bit like a second film, in a way. With American Pastoral, I had a nice budget, an amazing cast and the novel to base it on. The bar was very high. What I didn’t make was my little, indie, grungy, contemporary movie. That’s sort of what I feel like I should do next. I can only imagine doing it here and doing it with young people. I’d shoot it in five weeks and do it very quickly. I’ve got some very big ideas about it.”
McGregor was reunited with his fellow Trainspotting stars Robert Carlyle, Ewen Bremner and Jonny Lee Miller earlier this year for the long-awaited sequel, which is due to be released early next year.
The star had a publicised fall-out with Danny Boyle, the director of the hit 1996 movie, after being overlooked for a later film, The Beach, in favour of Leonardo DiCaprio.
However when McGregor last unveiled a film in Edinburgh - portraying both Jesus and Satan in Last Days in the Desert - in the summer of 2015 he revealed that he was ready to work with Boyle again, adding: “That’s in the past now and water under the bridge.”
Mark Adams, artistic director of the film festival, said: “We are delighted to be working with Entertainment Film Distributors and Ewan McGregor on this special gala.
“Ewan is a great supporter of the festival, and talked with enthusiasm about making his directorial debut with the film when he was with us in 2015, so it is a real pleasure to welcome him and the film back to Edinburgh.”
The Trainspotting sequel, entitled T2, was shot on various locations across Scotland during the summer and is currently being edited by Boyle ahead of its release early next year. It is loosely based on writer Irvine Welsh’s 2002 follow-up novel Porno.
McGregor has admitted he was worried he was not Scottish enough to star in the sequel to Trainspotting after living out of the country for so many years. The actor has revealed he was anxious about playing Mark Renton again as he felt so disconnected from his homeland.
The 45-year-old, who is originally from Crieff, moved to London when he was 17 and has lived in Los Angeles for the last eight years.
However, he told how his fears were allayed after he read the script and discovered the Renton character had been living abroad before returning to Scotland.