The X-Men: First Class actor plays the role of depraved Edinburgh police officer Bruce Robertson in the big-screen adaptation of the Irvine Welsh novel. Robertson is a bigot and racist who partakes in bestiality and cross-dressing.
McAvoy told The Daily Record: "I'm taking probably the biggest risk of my career in playing the part in Filth.
"It's an incredible role for me, unlike anything I've ever done and a massive challenge. One I hope I don't dash myself on."
However, McAvoy insisted that he understands the importance of taking on more challenging parts, not only as an actor, but as a lover of film.
"If you stop taking risks, then you get bored, or you just keep playing the same part, over and over again. Eventually audiences get bored of that as well," he explained.
"It is difficult because everyone is watching now. You can't fail in secret, or quietly. It's a public failure and people notice. It's not that I'm saying people rejoice in tearing you down. Not at all. But, people notice. They go, 'What a disappointment', and that's the worst thing, to disappoint people. So, it makes taking risks riskier."
Filth, which also stars Jamie Bell and Alan Cumming, will begin shooting in January.