The measurement of magnetic flux leakage (MFL) is widely used as a non-destructive technique for inspecting oil and gas pipelines. In this method, many factors can affect the MFL signal, but the magnetization of the pipeline is a fundamental issue that bears consideration. We investigated the dependence of the MFL signal on the magnetizing state of pipeline samples with respect to both near-side and far-side defects by varying the number of permanent magnets in each pole of the U-core system, varying the distance between the two poles, varying the gap between the U-core system and the surface of the steel plates engineered from a gas pipeline, and varying the depth of the rectangular defects. By systematically controlling the magnetization of the samples, we observed novel behaviors of the MFL signals as a function of defect depth. For samples having above-saturated magnetization, the dependence of the MFL signal can be expressed as a quadratic function for all defect depths. However, for samples having below-saturated magnetization, the MFL signal increases linearly at low-defect depths, but exhibits a quadratic response at high-defect depths. These findings have relevance for both fundamental research and practical applications, and they provide a novel and precise cartography method for accurately quantifying the depth of defects in MFL measurement.