Tom Wilson had a goal and an assist, Ivan Miroshnichenko had two assists, and Charlie Lindgren made 27 saves for Washington.
Robby Fabbri scored twice, Daniel Sprong had a goal and an assist, and Alex Lyon made 13 saves on 15 shots through two periods for Detroit before being replaced by Sebastian Cossa (12 saves) to start the third.
Sprong, who played for Washington from 2020-22, gave the Capitals a 1-0 lead at 3:35 of the second period before Nicklas Backstrom tied it at 7:38 on a deflected pass from Alex Ovechkin from the half-wall.
Wilson gave Washington a 2-1 lead at 12:31 with a slap shot following a face-off win in the right circle by Evgeny Kuznetsov.
Rasmus Sandin extended it to 3-1 with a power-play goal at 7:10 of the third before John Carlson made it 4-1 with the Capitals’ fourth consecutive goal at 16:11.
Fabbri scored at 16:56 and 18:47, both goals coming with Cossa pulled for the extra attacker, for the 4-3 final.