The musicians took the stage at the 60th music gala to send a message to Trump on his reported derogatory remarks against immigrants from Haiti and Africa.
Standing in solidarity with "DREAMers", children of undocumented immigrants who are fighting to stay in the US because of recent legislation, singer Camila Cabello called herself "a proud Cuban-Mexican immigrant" before she introduced U2's musical act.
"Today, in this room full of music's dreamers, we remember that this country was built by dreamers, for dreamers, chasing the American dream. I'm here on this stage tonight because, just like the dreamers, my parents brought me to this country with nothing in their pockets but hope.
U2 performed "Get Out of Your Own Way," which took place on a barge near the Statue of Liberty.
More From This Section
The music group's lead vocalist Bono shouted, "Blessed are the s**thole countries, for they gave us the American Dream."
His comments were censored on the CBS telecast in the US.
Sting was back on the Grammys stage and sang his 1987 hit "Englishman in New York", whose lyrics run - "Oh, I'm an alien/I'm a legal alien/I'm an Englishman in New York".
Logic performed his Grammy-nominated number "1-800-273- 8255" with Khalid and Alessia Cara at the music event and paused his act to proclaim, "You're not a sh*thole."
"... To all the beautiful countries filled with culture, diversity and thousands of years of history. You are not a s hole. You are beautiful. And lastly, on behalf of those who fight for equality in a world that is not equal, not just and not ready for the change we are here to bring.
The singer, who received two nods at the music event, was also bleeped out for his speech performance.
The Grammys were broadcast on VH1 in India.