The N.F.L. on Sunday ended months of uncertainty by officially announcing Maroon 5 and the rappers Travis Scott and Big Boi as the lineup for this year’s Super Bowl halftime show.

In an indication of how fraught the debate around the high-profile performance has become, Scott released a statement on Sunday announcing that he and the N.F.L. will partner on a $500,000 donation to the social justice group Dream Corps — a move that seemed to be aimed at stemming a backlash from groups that have criticized the football league’s policies.

Sources familiar with the N.F.L.’s Super Bowl plans had confirmed the rock band Maroon 5 as the headliner as long ago as September, and Scott emerged last month as a reported addition to the Feb. 3 halftime performance at Mercedes-Benz Stadium in Atlanta. Big Boi, the newest name on the bill, is a member of the Atlanta rap group Outkast.

But the run-up to this year’s halftime announcement had turned into a skirmish over sports and politics, as artists and others criticized the N.F.L. over its treatment of Colin Kaepernick and other players who have taken a knee during the national anthem in protest of racial injustice.