An experiment on measuring the magnetic field in Ramsey interaction region of the atomic fountain clock by detecting the Zeeman frequency shift of ~(87)Rb hyperfine transition is presented.By mu-metal shielding and coils compensating,the magnetic fluctuations resulting from asymmetry and instability are less than 10 and 0.025 nT,respectively.The relative frequency uncertainty of atomic fountain clock caused by the magnetic field is less than 5.4*10~(-16).