Foy, whose TV credits include Little Dorrit, Season of the Witch and The Promise, was recently seen in Ding Dong the Wicked and Love, Love, Love at the Royal Court.
The cast of Macbeth will also feature: Jamie Ballard (Macduff), Graeme Dalling (Donalbain), Lisa Gardner (Witch), Kevin Guthrie (Lennox), Richard Hansell (Ross), Forbes Masson (Banquo), Allison McKenzie (Witch), Olivia Morgan (Witch), Catherine Murray (Caithness), Callum O'Neill (Angus), Mark Quartley (Malcolm) and Hugh Ross (Duncan/Doctor).
Macbeth is the inaugural production in a season of work for Trafalgar Transformed, will be staged from 22 February to 27 April 2013 (previews from 9 February).
According to press material, "Jamie Lloyd's production will see Shakespeare's darkest tale play out in a dystopian Scotland brutalised by war. Under a toxic fog, Macbeth begins his tormented struggle for power fuelled by ambition and paranoia."
McAvoy, 33, whose film credits include The Last King of Scotland and X-Men, was last seen in the West End in Three Days of Rain in 2009 (which was also directed by Lloyd).
Design for the season is by Soutra Gilmour, who won a 2012 Evening Standard Award for Inadmissible Evidence at the Donmar Warehouse, directed by Lloyd, and Antigone at the National Theatre.