Context. Hi-GAL, an open time key-project of the Herschel satellite, was awarded 343 hours observing time to carry out a 5-band photometric imaging survey at 70, 160, 250, 350, and 500 μm of a |b| ≤ 1 • wide strip of the Milky Way Galactic plane in the longitude range −70 • ≤ l ≤ 70 • . Two 2 • × 2 • fields centred at l = 30 • and l = 59 • have been observed with the SPIRE and PACS photometric cameras in parallel mode during the Herschel science demonstration phase (SDP). From the images, compact sources are extracted for which the distance must be established in order to determine their physical properties. Aims. The aim of this paper is to present the distance determination strategy for the Hi-GAL compact sources. We illustrate this strategy for the two fields at l = 30 • and l = 59 • . Methods. The first step to determine the distance is to establish the LSR (local standard of rest) velocity of each compact source. The kinematic distance is then determined assuming a rotation curve for our Galaxy. To resolve the distance ambiguity for sources within the solar circle, we adopt a multiwavelength approach combining extinction maps, optical, and near infrared images, and velocity information from NH 3 , CO and HI data. When sources can be kinematically linked to optical H ii regions, the stellar distance of the exciting stars, when known, can be attributed to all linked sources. Results. In the two 2 • × 2 • SDP fields, 2678 compact sources have been identified and listed in the band-merged catalogue. About 93% of these sources have been assigned a radial velocity and distance. Conclusions. A multiwavelength approach is necessary to assign the correct velocity to sources (especially when CO spectra have a lot of features) and to determine the distance by solving the distance ambiguity. Also, several Hi-GAL sources seem to be in the interarm region. These sources have to be investigated with dedicated programme to be compared with sources located in the spiral arms.