Spain host Colombia in an international friendly on June 7 in Murcia before facing Macedonia in a World Cup qualifier in Skopje four days later.
Herrera was in the last squad in March but is not among the 25 players selected by Lopetegui for next month's games, with Chelsea's Cesc Fabregas also missing the cut.
"There are many players that merit to be in the squad, as is the case for [Real Madrid's Lucas] Vazquez and Ander Herrera," Lopetegui said in Friday's news conference. "Herrera was voted as United's best player of the season.
"Cesc also deserves it after a brilliant end to the season but we had to make decisions."