When measuring the geomagnetic declination, the azimuth of the reference mark must be measured. This paper briefly describes the principle of measuring the azimuth by the differential GPS (Global Positioning System), several test observations of GPS and the results. In geomagnetic survey in China during 2002∼2003, GPS was used in measuring the azimuth. Field observations by GPS were carried out during the period that satellite signals were better received. The statistical results of the GPS data at 135 stations in China show that the difference of the azimuths between 2 GPS measurements at various stations is 0.0 ∼5.9 and the average is 1.6 . The azimuthal accuracy measured by GPS in this paper is 0.1 , and it is much better than the azimuthal accuracy 1.0 given by Newitt et al. (1996). The observation results show that the azimuths measured by GPS are accurate and reliable; they are not related to the time-space changes. The geomagnetic declinations D at various stations were obtained based on the azimuths measured by GPS, and the standard deviation of the reduced value of D was < 0.4 . Using the reduced values, the 8-order spherical cap harmonic model and the 5-order Taylor polynomial model in China for D were obtained. In geomagnetic survey, GPS is also used in measuring the longitude, the latitude and the elevation at various stations.