Oil and gas are the main sources of energy for national economic development. Pipelines are the main means of transportation for oil / gas. It is an important national energy infrastructure, which is known as a “lifeline project”. As the mileage of pipelines increases, defects such as cracks, dents, corrosion as well as mechanical defects caused by changes in external forces occur frequently. Defects can result in pipeline ruptures, fires, property damage, and casualties. According to professor Giovanni’s assessment of pipeline accidents, pipeline defects are mainly caused by third party activities, corrosion and mechanical failure, accounting for 78.1% of all pipeline defects. Therefore, it is particularly important to conduct safety checks on pipelines. There are many pipeline defect detection techniques. One of these is the widely used pipeline magnetic flux leakage detection technique, having the advantage of being fast and efficient, which is suitable for detecting defects in pipeline ferromagnetic metallic materials. Most pipelines are located in harsh outdoor environments with various corrosion and mechanical damage defects. There are axial damage and circumferential damage to the pipeline, resulting in a wide variation in the leakage field. Coupled with this, there is a variety of interference in the signal, so the current pipeline defect identification diagnosis and prediction accuracy are low, with the identification accuracy maintained at around 90%. Therefore, to improve the recognition accuracy, a neural network algorithm was designed to identify and analyze the detection signals. By using a multilayer neural network for training and learning, the recognition accuracy and reliability of pipeline defects are improved. Further, a safety detection basis is provided for the development of the pipeline business. The main contributions are as follows: First, a pipeline defect magnetic flux leakage detection simulation platform is described. Then, pipeline defect detection as good as signal collection are completed. Second, the data is fused and processed, togethering with setting to produce a neural network dataset. Third, a neural network structure is produced to analyze and study the collected pipeline signals. This paper completes the identification of magnetic flux leakage information of pipeline defects, and lays a foundation for future pipeline safety assessment to establish a safe pipeline operation system.