The Spin-Exchange Relaxation-Free Comagnetometer (SERFCM) is a new quantum instrument with ultra-high accuracy. Normally, the atomic ensembles of SERFCM operate in an open-loop state, which is not conducive to long-term high-precision measurements. In order to realize closed-loop control of its atomic polarization state, it is necessary to model and analyze the dynamic characteristics of the SERFCM system. In this paper, a Data-driven physical mechanism (DDPM) modeling method is proposed to realize the modeling of the SERFCM, a multi-input multi-output system. First, the state space equations of the SERFCM are established based on the Bloch equation, which are transformed into a discrete transfer function matrix. Then, based on the criterion of least variance in estimation, we realize the modeling of the discrete transfer function matrix using the excitation input data, the measured output data, and the estimated output data. Finally, the simulation results of modeling under different longitudinal magnetic fields confirm the validity of the proposed method. This work enables the online modeling of SERFCM system and facilitates the analysis of the effects of various parameters on the dynamic characteristics.