The particle transport process and the degree of energy attenuation are different when the particle flow released by the decay of the radioactive source crosses the shielding material of different thickness. According to this feature, a method that measuring β particle’s energy deposition caused by internal β radioactive source at outer side of the pipeline was proposed to realize online nondestructive corrosion detection for aerial metallic oil and gas pipeline. The differences and characteristics of photon, electron flux and their energy distribution when β particles passed through different thickness of steel shielding material was analyzed. After β radioactive source were devoted into the pipeline, the transport results of β particles generated by the decay penetrating the metallic pipeline wall of normal and different corrosive degrees and eventually entering the NaI particle detectors were tested. Variance analysis was carried out to compare whether the thickness or area was more sensitive to this method. The results show that the ray detection method has strong sensitivity to the detection of corrosion thickness. This method can effectively detect corrosion damage with thickness exceeding 40% of the wall thickness of the pipeline.