McAvoy was raised in Drumchappel, Glasgow, by his grandparents after his father, also called James and a roofer by trade, abandoned his mother when James Jr. was 7. He went to St. Thomas Aquinas Secondary in Jordanhill, Glasgow, where he did well enough and started "a little school band with a couple of mates".
McAvoy toyed with the idea of the Catholic priesthood as a child but when he was 16, a visit to the school by actor David Hayman sparked an interest in acting. Hayman offered him a part in his film The Near Room (1995) but despite enjoying the experience McAvoy didn't seriously consider acting as a career, though he did continue to act as a member of PACE Youth Theatre. He applied instead to the Royal Navy and had already been accepted when he was also offered a place at the Royal Scottish Academy of Music and Drama.
He took the place at RSAMD and when he graduated in 2000, he moved to London. He'd already made a couple of TV appearances by this time and continued to get a steady stream of TV and movie work until he came to British public attention in 2004 playing Steve McBride in the successful UK TV series "Shameless" (2004) and then to the rest of the world in 2005 as Mr Tumnus in Disney's adaptation of 'C. S. Lewis''s The Chronicles of Narnia: The Lion, the Witch and the Wardrobe (2005).
Since then he and his easy facility with accents (no, wait, what? he's Scottish?) have been much in demand.