The initial inversion model is typically established in a transient electromagnetic nonlinear inversion, assuming the accurate capture of the number of layers in the geoelectric model; however, this assumption leads to significantly poorer inversion results for complex models when obtaining the exact number of layers from available a priori information, which is challenging. This study proposes a segmented regularized inversion method to enhance inversion accuracy and stability under varying conditions. The process involves two key steps: Firstly, a segmented initial model is established based on preliminary information. The layering criteria and layer thickness threshold for each segment are set during inversion to reduce dependence on the accuracy of the preliminary information. Secondly, a segmented regularization constraint is added to the objective function to improve the efficiency and stability of the inversion, as numerous parameters can exacerbate the problem of inversion ambiguity. Subsequently, an improved sparrow search algorithm (ISSA) is utilized to optimize the inversion objective function. This enhances the efficiency of searching for the objective function and the algorithm’s ability to escape local optimal solutions. The proposed method is evaluated using one-dimensional and two-dimensional models with different initial models and inversion algorithms and applied to the inversion of on-site exploration data in a coal mining area in Chongqing. Comparative results demonstrate that the proposed segmented regularization method, based on the improved sparrow search algorithm, exhibits superior practicality and a higher fitting accuracy.