We study the influence of external magnetic field on the shift of the resonant frequency in the photoassociation of ultracold Cs atoms, which are captured in a magnetically levitated optical crossed dipole trap. With the increase of the photoassociation laser intensity, the linear variation of the frequency shift is measured by recording the photoassociation spectra of the long-range 0 + u state of Cs molecule below the 6S 1/2 + 6P 1/2 dissociation limit at different magnetic fields. The slope of the frequency shift to the intensity of the photoassociation laser exhibits a strong dependence on the external magnetic field. The experimental data is simulated with an analytic theory model, in which a single channel rectangular potential with the tunable well depth is introduced to acquire the influence of the magnetic field on the atomic behavior in the effective range where photoassociation occurs.