Ship magnetic field modeling is a core element in the development of naval magnetic detection and stealth technologies. Currently, equivalent source modeling methods predominantly employ magnetic sources. However, their inversion processes often suffer from abstract physical interpretations and the ill-posed nature of equations, typically requiring multi-objective optimization or regularization to mitigate these issues. To fundamentally circumvent ill-posed problems, this paper proposes an electric equivalent source modeling method based on iterative modeling and a hierarchical optimization strategy. The proposed model utilizes current-carrying circular loops with distinct physical significance as fundamental units, ensuring ensuring the model can directly serve engineering construction. The iterative modeling follows a "simple-to-complex" principle, evolving from a low-dimensional coarse model with few loops to a high-dimensional refined model. Results from the previous generation serve as prior information to guide the construction of the subsequent model, ensuring the entire inversion process remains well-posed and controllable. Once the quantity and structure of the loops are determined, a position-current hierarchical optimization strategy is employed for parameter solving. Specifically, the outer layer utilizes linear optimization to search for loop positions, while the inner layer leverages the explosive search capability of the Fireworks Algorithm to determine optimal current magnitudes. This strategy successfully transforms high-dimensional ill-posed inversion into a series of low-dimensional, well-posed optimization problems. Numerical experiments based on finite element models under two geomagnetic environments demonstrate the method's superior accuracy and stability. The relative error on the modeling plane is consistently controlled within 5%. Even with superimposed measurement noise, the error remains at a comparable level, exhibiting strong robustness. Meanwhile, inward and outward magnetic field extrapolation errors are maintained within the 6%–9% range. This study confirms that the proposed method effectively circumvents the ill-posed pitfalls of traditional inversion, providing a novel pathway with significant engineering application value for high-precision and robust ship magnetic field modeling.