McGee also grabbed 11 rebounds.
John Wall distributed a career-high 15 assists and scored all nine of his points during a 28-4 run after halftime that put the Wizards in charge.
The victory was only the second win in 12 road games for Washington, which had lost six of seven games overall entering Sunday's contest.
The Pistons, meanwhile, had their four-game winning streak snapped.
Greg Monroe led Detroit with 27 points and six rebounds.