Organisers of the Global Citizen Festival said Modi will be attending the event on September 27 because he is dedicated to bringing an end to open defecation.
"Modi is coming to the festival because he is dedicated to helping people to see that using toilets is safer and cleaner than defecating in the open," the organisation said.
Modi will be among the dozen world leaders, who will be attending the free ticketed event that will be held in the Great Lawn of the Central Park, a sprawling green island in the middle of concrete Manhattan.
The event will be hosted by actors Hugh Jackman, Jessica Alba and Katie Holmes and feature performances by music icon Jay Z.
Other global leaders who will be attending the festival include Bangladesh Prime Minister Sheikh Hasina, World Bank President Jim Yong Kim, Prime Minister of Norway Erna Solberg and Prime Minister of Nepal Sushil Koirala.
The festival organisers said that the dignitaries will participate in the festival to "voice tangible commitments that could affect the lives of 50 million people."
The organisation said Koirala is committed to making toilets more accessible even in the remotest parts of Nepal.
"When people think of development, they think of classrooms and construction projects. They should also think of toilets, which are fundamental to a community's growth," the organisation cited the Nepali leader as saying.
In a statement, Hasina said she is "delighted" to join the Festival and share Bangladesh's unique experience and achievement in education, sanitation, health and women's empowerment.
Modi is expected to reach New York on September 26 and will address the UN General Assembly the next day, giving his first global speech to an audience of nearly 200 world leaders.
After a grand community reception at the Madison Square Garden on September 28, Modi will head to Washington for his crucial bilateral meeting with President Barack Obama.
The Global Citizen is an initiative of Global Poverty Project, an international education and advocacy organisation working to catalyse the movement to end extreme poverty by 2030.
SAARC members must cooperate to face common challenges: Rajnath
UN chief wanted Modi to be at climate change summit
Rupee trims initial gains, still up at 60.82 Vs dollar
Xi invites Modi to visit his hometown Xi'an in China
Spotted: Dangerous suitcase on PM Modi's Nepal trip