The transformer nonlinear model is established under considering remanent flux of transformer. According to iron core structure of transformer, the circuit equations and magnetic circuit equations are derived respectively, and both of them are connected. Ferromagnetic hysteresis loop of transformer was simulated based on Jiles-Atherton theory. No-load switching excitation inrush current is studied under condition of different remanent flux and switching angle. The results show that the remanence and switching angle has great influence on the hysteresis loop and excitation inrush current. Meanwhile, the distortion of hysteresis loop determine to the amplification of the excitation inrush current。