Carlyle, who also appears in front of the camera in comedy thriller The Legend of Barney Thomson, heads up a star-studded cast who are expected to grace the red carpet outside the Festival Theatre.
The film’s world premiere is the first to be announced by new artistic director Mark Adams, who was appointed in December after the surprise departure of Chris Fujiwara after just three years in the post.
Emma Thompson, who plays Carlyle’s on-screen mother, is joined by Ray Winstone, Ashley Jensen, Martin Compston, Kevin Guthrie and Tom Courtenay in the “darkly-humorous film, set and shot in Glasgow.
Carlyle, a patron of the long-running festival, plays a downtrodden and awkward Glaswegian barber who inadvertently stumbles into serial murder in the big-screen adaptation of Douglas Lindsay’s book “The Long Midnight of Barney Thomson.
With his mother harbouring a secret of her own and causing her own bloody chain of events, Carlyle’s character is being pursued by Winstone’s Glasgow detective who is struggling to lead a team of inept officers.
Carlyle, who was forced to pull out of an appearance at the festival three years ago due to ill health, said: “After a career-long association with the EIFF it gives me enormous pleasure to have The Legend of Barney Thomson chosen as the opening night film.
“It really is such an honour for me to have my first feature as director premiered here in Edinburgh at the festival that has played such a huge part in my life.”
Mark Adams, the festival’s newly-appointed artistic director, said: “We are thrilled to be opening this year’s festival with Robert Carlyle’s wonderful black comedy.
“It is a marvellously macabre and playful film, impressively directed and with a terrific cast. It is the perfect film to kick off what promises to be anexciting festival.”
Tickets for the EIFF opening gala go on sale tomorrow.