The former England international capitalized on an Orlando giveaway in its attacking half. Rooney looked up to see goalkeeper Brian Rowe out of his area and rocketed the first-strike shot from inside his own half.
Rowe scrambled back to position but could only watch helplessly as the ball flew over his outstretched hands.
The 33-year-old joined Major League Soccer in 2018, signing a three-and-a-half-year deal with D.C. United. He made his debut that July, coming off the bench to tally an assist in a 3-1 win over the Vancouver Whitecaps.
Rooney, the all-time leading scorer for England's national team and Manchester United in the English Premier League (EPL), has dazzled with his goal-scoring ability throughout his career.
Last year, he scored a similar goal from his own half for Everton against West Ham in the EPL.
D.C. United (8-4-6) snapped a five-game winless stretch — with four draws during the span. Orlando (5-8-3) has just two wins in its last seven games. Goalkeeper Bill Hamid made three saves to get his eighth shutout of the season.
In the first matchup of the season, Rooney set up a goal and scored directly from a free kick to help D.C. United win 2-1 on March 31 in Orlando.
The Associated Press contributed to this report.