The commonly used and cost effective corrosion inspection tools for the evaluation of pipelines utilize the magnetic flux leakage (MFL) technique. The MFL signal is usually contaminated by various noise sources. In this paper, we propose that the pipeline flaw MFL signal is extracted using the ensemble empirical mode decomposition (EEMD) and the sparsity. At first, we introduce the EEMD method. The EEMD defines the true intrinsic mode function (IMF) components as the mean of an ensemble of trials, each consisting of the signal plus a white noise of finite amplitude. Moreover, sparsity selection restriction was defined. Then, The MFL signal is decomposed into several IMFs used for signal reconstruction. Some modes are selected to reconstruct a new signal considering their sparsity. Finally, the comparison is made with the empirical mode decomposition. At the same time, the comparison of the selection restriction between the sparsity and the energy is described. The results show that the EEMD and the sparsity is an efficient technology with the pipeline flaw extraction.