The invention relates to the technical field of pipeline geographic information measurement, in particular to a positioning device and method for pipeline detection. The problems that in the prior art, the precision is low, and remote measurement cannot be achieved are solved. The positioning device comprises a power supply module, two supporting rollers, a first plastic sealing ring, an inertia measuring module, a data processing unit, a second plastic sealing ring, a data storage unit, a mileage instrument, a flux leakage sensor, a communication cable and a magnetic tracking module. The inertia measuring module is composed of a gyroscope and two accelerometers; on the basis of the mileage instrument, and three-dimensional attitude angle, speed and position coordinate measurement inside the pipeline can be achieved. According to the positioning method, a complex continuous wavelet transform method is adopted for analyzing operating data of the inertia measuring module inside the pipeline, a pipeline connector is detected, and the method is used for correcting azimuth angle errors of the positioning device for pipeline detection. The device and method are applicable to detection ofland and underwater oil and gas pipelines.