McAvoy was born in Glasgow, Scotland. He was raised as a Roman Catholic. He married English actress Anne-Marie Duff on 11 November 2006 but they divorced in 2016. They have a son named Brendan, born in 2010.