We present observations of the ground state 1(0,1)-0(0,0) rotational transition of HDO at 464.925 GHz and the 1(1,0)-1(0,1) transition at 509.292 GHz, toward three high-mass star-forming regions: G34.26+0.15, W49N, and W51(e1/e2), carried out with the Caltech Submillimeter Observatory. For the first time, the latter transition is observed from the ground. The spectra are modeled, together with observations of higher-energy HDO transitions, as well as submillimeter dust continuum fluxes from the literature, using a spherically symmetric radiative transfer model to derive the radial distribution of the HDO abundance in the target sources. The abundance profile is divided into an inner hot core region, with kinetic temperatures higher than 100 K, and a cold outer envelope with lower kinetic temperatures. The derived HDO abundance with respect to H-2 is (0.3-3.7) x 10(-8) in the hot inner region (T > 100 K) and (7.0-10.0) x 10(-11) in the cold outer envelope. We also used two (H2O)-O-18 fundamental transitions to constrain the H2O abundances in the outer envelopes. The HDO/H2O ratios in these cold regions are found to be (1.8-3.1) x 10(-3) and consequently are higher than in the hot inner regions of these sources.