Long-distance data transmission plays an important role in geophysical applications. This paper introduces a chip-encoded version of the Manchester-II decoding algorithm that can be used for long-distance transmission for well logging. It can be realized easily in a field programmable gate array (FPGA) hardware chip. We designed a wave tracking technique to optimize the algorithm's real-time decoding, adaptive capacity, and robust decoding. The algorithm could be divided into two modules, a data pre-processing module and a data decoding module, which is comprised of AMI code extraction and Manchester-II decoding. With the help of this algorithm, Manchester-II data transmitted via a 7,000 meter armored cable can be decoded in real time. Measurements in the lab and in situ show that communication systems based on this algorithm decoded correctly and achieved good bit error rate specifications. Compared to traditional methods using some specified encoding chips or digital signal processors, transmissions realized with this algorithm are less expensive and showed better adaptability and real-time performance. In addition to borehole geophysical applications, this algorithm can be used in environmental and engineering geophysical applications where data transmission over long distances is needed, whether on the surface or deep into the Earth.