Eager to pivot from a divisive war in Iran, Trump sought to use the event on the National Mall ahead of the Independence Day milestone on July 4 to tout a country he often takes credit for restoring to greatness.
"As we stand on the edge of our 250th year of independence, I am thrilled to declare that America is back," Trump told thousands of people in the crowd from behind a wall of bullet-proof glass that extended across the stage.
The Mall was festooned with patriotic decor including American flags and Freedom 250 signs, while signs promoting The Great American State Fair splashed across screens surrounding the stage.
With the Washington Monument visible in the distance, military jets periodically soared overhead, including a B-2 stealth bomber flanked by four F-35 fighter jets.
The Republican president invoked history and honoured the anniversary before launching into a familiar refrain of his accomplishments, from claiming victory in the war with Iran and economic prosperity.
"We are beginning the most unforgettable birthday party any country has ever seen," Trump said. "Oh, you're gonna have a good time."
The event underscored how Trump has blurred the line between official commemoration and campaign-style politics, repackaging a public fair in the heart of Washington around the rally format that has defined his presidency.
The anniversary events have been marked by months of friction, including unconventional programming, the withdrawal of several musical acts and Trump's renovation of the Lincoln Memorial Reflecting Pool near the site of the celebrations.
Trump, who has taken a personal interest in the celebrations, is facing a difficult political moment. The nearly four-month-old Iran war has pushed consumer prices to a three-year high and unnerved many voters. Just one in four Americans believes the US-Israeli war with Iran was worth its costs, a Reuters/Ipsos poll found.
People attending the rally expressed support for Trump but also wished he would seek more national unity and tone down some of his flourishes.
Steve Dallenbach, 73, a retired home builder originally from Iowa who now lives near Charlotte, North Carolina, drove to Washington to see the monuments and fountains.
A three-time Trump voter, he said the president was doing a good job beautifying the capital city and that he backs the president's policies, though Trump can get "a little carried away with attitude."
The festival initially was set to feature a broad line-up of performers, including Poison frontman Bret Michaels, Young MC and the Commodores, but those acts and others withdrew amid concerns about joining a potentially partisan event.
The revised program included musical performances by Lee Greenwood and Christopher Macchio, two artists favoured by Trump, and military bands.