Ousted, who was out of contract after the end of the 2017 season, has signed a two-year deal with United.
A finalist for 2015 MLS Goalkeeper of the Year honors, the 32-year-old will compete with Steve Clark for the starting job at Audi Field following the offseason departure of Bill Hamid to Danish side Midtjylland.
"We are thankful to David for his five seasons in Vancouver," Whitecaps coach Carl Robinson said in a news release. "We're happy that we were able to help David move into a situation that was attractive for him and his family, and we wish him the best at D.C. United."
Ousted has recorded 43 shutouts in 144 appearances over five MLS seasons since joining the Whitecaps from Randers in 2013.
He compiled a 13-8-6 record over 28 starts last year but lost his spot late in the season to New Zealand international Stefan Marinovic, who started all three of Vancouver's playoff games.