Variety has reported that Thompson has signed up to star alongside Carlyle in his directorial debut of the movie, set in Glasgow.
Carlyle will appear in the film as Barney Thomson, a Scottish barber who accidentally stumbles into serial murder, while Thompson will play his mother.
Ray Winstone and Ewen Bremner are also set to appear. It has also been rumoured that Ewan McGregor may play a part in the film.
The comic thriller is based on a series of works by Lanarkshire-born Douglas Lindsay and has been adapted for the big screen by Richard Cowan and Colin McLaren.
The headline novel was serialised on HeraldScotland last year. Lindsay's publisher is Blasted Heath, the e-books specialist.
Kyle MacRae, co-founder of Blasted Heath, said: "Who better than Robert Carlyle in the role of the renegade barbershop legend, Barney Thomson, in this very dark, very funny and totally original Scottish comedy? And as for Emma Thompson as Barney's mum - perfect! There are seven novels in the Barney series so we're looking forward to a mega-franchise with appropriate barbershop merchandise (not safe for kids)."
The film is scheduled to go into production this year. It will be introduced to international buyers at the European Film Market in Berlin.