In order to analyze the AC-DC harmonic transfer characteristics and the interaction mechanism, it is necessary to establish an accurate harmonic impedance model of the UHVDC transmission system. As a key component of the HVDC transmission system, it is important to study the harmonic impedance modeling method of HVDC lines. This paper presents a method for establishing the harmonic impedance model of HVDC transmission lines based on distributed parameters. The low-order approximation of the vector fitting method can effectively represent the frequency-dependent characteristics of wave impedance, which avoided the complexity of solving the infinite integral multiple times, so this method has certain engineering value. We select the number of segments of the π-type equivalent circuit and the equivalent RLC parameters of each section of the line rationally to realize the establishment of harmonic impedance model of long-distance transmission lines. The simulation results of the harmonic impedance of the line model verify the correctness of the proposed method.