Magnetic flux leakage (MFL) testing technology is widely employed in non-destructive testing of pipelines, and the analysis of leakage signals plays a crucial role in assessing safety. This paper introduces a novel approach for MFL testing, which combines finite element simulation with artificial neural networks. Firstly, a simulation model is developed to study MFL testing in defective pipelines, with a focus on investigating how magnetization state and defect dimensions impact the leakage signal. Signal features are subsequently defined and extracted through an analysis of the distribution curve of MFL signals. Finally, a Kernel Extreme Learning Machine (KELM) model is constructed, and optimization is carried out on the influential parameters to predict defect dimensions. The results demonstrate that the effect of magnetization intensity on the magnetization state can be categorized into two stages: a nonlinear growth stage and a saturated linear growth stage. Additionally, an increase in defect size has the effect of delaying the magnetization process in pipelines. Notably, changes in defect dimensions have a pronounced impact on the distribution of MFL signals. And KELM prediction model is demonstrated to be capable of accurately and efficiently predicting the depth, length, and area of defects.