Nasri had been snubbed by coach Didier Deschamps since he was banned for three matches by the French federation for insulting a reporter following the team's Euro 2012 quarter-final defeat by Spain last June.
However, Deschamps appeared to be impressed with the 25-year-old's recent form.
"The most important criterion for me is being competitive. For a good few weeks he has been competitive, with his club," Deschamps told a news conference on Thursday.
"The past is the past, you can't go back or wipe it out."
Bayern Munich's Franck Ribery, who will play in the Champions League and German Cup finals within the space of seven days, was left out of the 23-man squad for the friendlies in Uruguay and Brazil on June 5 and 9 respectively to spare him any risk of injury.
"With all the fatigue and adrenaline of the two finals ... I decided not to take a stupid risk," Deschamps said.
"The most important thing is that he keeps the level he has had since the start of the season."
Manchester United left back Patrice Evra has also been left out of the squad but for "sporting reasons", Deschamps said.
Porto centre back Eliaquim Mangala and St Etienne midfield Josuha Guilavogui will join France for the first time, while Valencia defender Adil Rami, who was not called up for the World Cup qualifiers in March, was back in the squad.
Goalkeepers: Mickael Landreau (Bastia), Hugo Lloris (Tottenham Hotspur), Steve Mandanda (Olympique Marseille)
Defenders: Gael Clichy (Manchester City), Mathieu Debuchy (Newcastle), Laurent Koscielny (Arsenal), Eliaquim Mangala (FC Porto), Jeremy Mathieu (FC Valence), Adil Rami (FC Valence), Bacary Sagna (Arsenal), Mamadou Sakho (Paris St Germain)
Midfielders: Yohan Cabaye (Newcastle), Etienne Capoue (Toulouse), Yoann Gourcuff (Olympique Lyon), Josuha Guilavogui (St Etienne), Blaise Matuidi (Paris St-Germain), Samir Nasri (Manchester City)
Forwards: Karim Benzema (Real Madrid), Olivier Giroud (Arsenal), Bafetimbi Gomis (Olympique Lyon), Jeremy Menez (Paris St Germain), Dimitri Payet (Lille), Mathieu Valbuena (Olympique Marseille)