Real Salt Lake, which leads the Western Conference in the MLS standings, had been trying to win the Cup for the first time.
Salt Lake put relentless pressure on D.C. in the second half, firing numerous shots on goal.
Those efforts nearly paid off in the 59th minute when Sebastian Velasquez unleashed a left-footed shot that hit off the crossbar.
Salt Lake had another good opportunity in the 81st minute when Kyle Beckerman chipped the ball to Alvaro Saborio near the right post. Saborio fired a quick volley, but Hamid knocked his shot over the crossbar.
"We can't seem to get over that last hurdle," Salt Lake coach Jason Kreis said. "We scratched it out and did everything necessary to get to the point where we should have goal-scoring chances. It seemed like every single time, it just wasn't going to happen."