The invention provides a frequency stability control and compensation method for automatically keeping time in a complex environment, relates to a high-precision time-keeping technology and solves the problem of low precision of time keeping and time serving in the complex environment. The method comprises the following steps of: firstly, receiving an external signal by a ground time serving instrument, acquiring external standard time, selecting a time signal as a reference time source, then adopting a 10 MHz constant-temperature crystal vibrator as a frequency source of an internal clock, generating 1 pulse per second (PPS) pulse by a frequency dividing circuit to allow the clock to count, using the count as the internal time, calibrating the clock rate by utilizing a 1PPS signal demodulated by satellite time as the reference, and saving a calibration parameter; secondly, synchronizing the internal time by utilizing the reference time source, acquiring initial time information, and generating clock time information by internal clock counting; and finally, after successfully synchronizing the time, automatically keeping time through the constant-temperature crystal vibrator to enter the time keeping state, correcting the clock rate by using the calibration parameter, and outputting the final time. The method is suitable for keeping time in the complex environment.