An optical pumping scheme is proposed for reducing the gradient of electron spin polarization and suppressing light source noise in a spin-exchange relaxation-free magnetometer. This is achieved by modulating only the phase of a narrow-linewidth pump light field with external Gaussian noise. Compared to the absence of phase modulation, the uniformity of electron spin polarization was improved by over 40%, and the light-frequency noise suppression ratio of the magnetometer was enhanced by 4.3 times. Additionally, the response of the magnetometer was increased by 54%, resulting in a sensitivity of 0.34 fT/Hz1/2 at 30 Hz. The applicability of this scheme can extend to other optical pumping experiments involving large atom ensembles requiring uniform electron spin polarization distribution, which is beneficial for developing ultra-high sensitivity and high stability magnetometers essential for magneto-cardiography and magneto-encephalography research applications.