The Dumfries-born defender has an ankle problem and will miss the Tartan Army's games against Canada and Slovenia.
Hanley made only his second league start of 2017 in Saturday's 0-0 draw at Birmingham.Leeds defender Liam Cooper has been drafted into Gordon Strachan's squad as a replacement. Matt Ritchie remains with the group.
Meanwhile, Ciaran Clark - who had been named in a provisional Republic of Ireland squad last week - will not feature for his country against Wales or Iceland due to the knee injury which saw him substituted against Fulham and miss out against Birmingham.
United goalkeeper Rob Elliot has also been cut from Martin O'Neill's initial squad, but Daryl Murphy has linked up with Eire for the two matches.