Polyaniline-dodecylbenzene sulfonic acid (PAn-DBSA) complex was thermally treated and its conductivity and structure change were investigated. The conductivity increased linearly from 1.1 x 10(-4) to 3.0 x 10(-1) S/cm on thermal heating until 140 degrees C, but decayed above 200 degrees C. The increase was caused by an additional thermal doping resulting from an increasing mobility of undoped dopants. After the thermal doping, the formation of the layered structure of PAn-DBSA is made. The decrease was caused by the thermal decomposition of dopants. The conductivity changes at a high temperature was strongly dependent on the nature of the dopant. The results were confirmed by means of X-ray patterns and Fourier transform infrared spectra obtained in the heating and cooling processes of polyaniline.