"Tonight, I'm taking a knee for America; but not just one knee, I'm taking both knees," he said on stage Saturday before his performance at the Global Citizens Festival.
"Both knees in prayer for our planet, our future, our leaders of the world and our globe. Amen ...
During the event, Wonder also spoke about interrupting hate, bigotry and condemning sexism.
Trump criticized some in the NFL on Friday night
at a rally in Alabama, saying team owners should fire players for taking a knee during the national anthem.
His remarks appeared to refer to Colin Kaepernick -- formerly with the San Francisco 49ers, but currently without a team -- who last year drew national attention for refusing to stand during "The Star-Spangled Banner" prior to kickoff.
"I am not going to stand up to show pride in a flag for a country that oppresses black people and people of color," Kaepernick said last year.
Trump is responding a year later, saying if fans would "leave the stadium" when players kneel in protest during the national anthem, "I guarantee, things will stop."
Trump said NFL owners should respond to the players by saying, "Get that son of a b***h off the field right now, he's fired. He's fired!"
Addressing the crowd before he performed, Wonder urged attendees to denounce bigotry and racism.
"Our global brothers and sisters, I didn't come here to preach, but I'm telling you, our spirit must be in the right place. All the time -- not just now, but tomorrow and whenever you, whenever you, whenever you need to interrupt hate, stand down bigotry, condemn sexism and find love for all of our global brothers and sisters every day," Wonder said.
He then took a knee with his son, Kwame Morris.
Other entertainers, athletes respond
Oakland A's catcher Bruce Maxwell also took a knee during the national anthem
Saturday, the first Major League Baseball player to do so, according to the San Francisco Chronicle
Several sports stars have released statements criticizing Trump, including LeBron James, who called Trump a "bum" for his tweet uninviting Golden State Warriors' Stephen Curry from visiting the White House.