The invention discloses a rubidium atomic magnetometer and a magnetic field measuring method. Based on the principle of nonlinear magneto-optic rotation, and through combination of timing control and tracking type frequency locking control, the atomic magnetometer achieves a large dynamic measurement range, high magnetic field sampling rate and high sensitivity. A DSP timing control module controls on-off of an acousto-optic modulator and a radio-frequency signal source in the physical part of the rubidium atomic magnetometer according to timing combination to adjust the magnetic field sampling rate N. The DSP timing control module further controls acquisition triggering of a data acquisition card. A calculation unit gets the Larmor precession frequency (f) through fast Fourier transform with use of a received rubidium atom Larmor precession free relaxation signal, and further calculates the value of an external magnetic field. The calculation unit selects a high magnetic field sampling rate module or a low magnetic field sampling rate module before measurement according to the pre-judged dynamic range of a to-be-measured magnetic field, and sets whether a tracking type frequency locking work mode is used when the low magnetic field sampling rate module is selected. In the working process, data is acquired and processed, and the value of the magnetic field is output.