Angular dependent XPS technique combined with in situ heating method was used to study the chemical and aggregational structure of polypyrrole films prepared by electrochemical polymerization. The results show that the relative concentration for various atoms within the surface region decreases in the order of C OS N.There are at least two inequivalent N heteroatoms,i.e.the pyrrole N and the oxidized pyrrole N atoms. The polypyrrole chains are not degraded by heating the polypyrrole films at 200℃ in vacuum. The anions, however, move to the top surface region during heating, and a decrease in the oxidized N heteroatoms is observed after heating.