“To be fair, we can acknowledge that we’ve had some really bad political discourse in this election, but this is about four sick kids who probably can’t even spell Trump let alone know anything about the election,” Mr. Brady said.

The Rev. Jesse L. Jackson said he had been urgently trying to reach the victim’s family. “We want to do whatever we can do to help, to show our love for the child,” he said.

Of the attack itself, he said, “This is an ethical collapse, not an ethnic affirmation.”

In Washington, the White House press secretary, Josh Earnest, said the beating demonstrated “a level of depravity that is an outrage to a lot of Americans.”

Police officials said they had sought the hate crime charges because of comments about the victim’s race and diminished mental capacity. Commander Duffin said the police did not know whether the victim had voted in November, or whether that had influenced the attack. But the invocation of Mr. Trump’s name, and the simmering racial tensions after a contentious election season, convinced many on social media that it was an act of racial hatred with political overtones.

In Chicago, city officials and black leaders condemned the attack and offered support to the victim.

Image Police photos of the suspects charged Thursday in a beating streamed live on Facebook, clockwise from top left: Brittany Covington, 18; Jordan Hill, 18; Tesfaye Cooper, 18; and Tanishia Covington, 24. Credit... Chicago Police Department

Mayor Rahm Emanuel called the assault “sickening,” adding, “There is more to our city than that.”

The police superintendent, Eddie Johnson, called the beating “deplorable” and praised the officers who spotted the victim walking on the street and called for an ambulance.