Cunningham, who missed FC Dallas' 1-0 win over Houston on Wednesday due to a sore left knee, scored on a right-footed shot from 10 yards out.
Heath Pearce started the scoring sequence with a pass to David Ferreira who redirected the ball to a streaking Cunningham. Cunningham then scored his fourth goal of the season and FC Dallas (2-1-4) won its second straight.
United midfielder Kurt Morsink nearly tied it the 79th minute with a shot from outside the penalty circle that hit the crossbar. United (1-6-0) was shut out for the fifth time this season.
FC Dallas goalkeeper Kevin Hartman had four saves, including two within an 11-second span on shots by Danny Allsopp and Adam Cristman from within the penalty box.
FC Dallas did not get a shot on goal until Daniel Hernandez's shot from 25 yards away in the 50th minute before finishing with seven.
D.C. United goalie Bill Hamid finished with five saves in his second career MLS start.