With the tie, Philadelphia (10-3-5) clinched a playoff berth. The Union have one loss in their last nine games and are three points behind Eastern Conference-leading Toronto.
RELATED: Philadelphia Union welcome back fans inside the stands
Philadelphia Union welcome back fans inside the stands
The 21-year-old McKenzie ripped a one-touch shot, off a clearance attempt by United, from well outside the area to close the scoring in the 87th minute.
D.C. United (2-10-6) snapped a five-game losing streak, but is winless in its last nine games dating to a 1-0 win over the New York Red Bulls on Sept. 2.
Philadelphia's Anthony Fontana opened the scoring in the 49th minute, but Donovan Pines side-netted a header off a corner kick by Yamil Asad in the 71st and then Asad converted from the penalty spot in the 75th minute after a hand ball in the area by the Union.
D.C. United interim coach Chad Ashton - who took over last week after Ben Olsen was fired - earned his first MLS point in his second game at the helm.