This was confirmed by the Nigeria Football Federation (NFF) in a statement on Friday.
The game has been scheduled for June 2, 2022, at the 25,000-capacity Red Bull Arena in New Jersey, USA.
The match will be played only five days after the Super Eagles would have squared up the El Tri of Mexico, in another international friendly.
Ecuador currently ranks 46 in the world by FIFA and reached the Round of 16 at the 2006 World Cup finals in Germany (their second appearance at football’s high table, following their debut in the Far East in 2002).
Nigeria has participated in the FIFA World Cup finals on six occasions, reaching the Round of 16 in 1994, 1998 and 2014.