The electrochemical quartz crystal microbalance (EQCM) was used to study the electrosyntheses and electrochemical properties of two kinds of polyaniline (PANI)–thiol composite films in aqueous solutions, which were prepared by covalent binding of a thiol to the oxidized forms of PANI (PANIpost–thiol, protocol A), and electropolymerization of aniline in the presence of a thiol (PANIpoly–thiol, protocol B), respectively. The thiols involved were mercaptosuccinic acid (MSA), thioglycolic acid (TGA) and β-mercaptoethanol (ME). The PANIpost–thiol binding processes were monitored in situ with the EQCM, giving molar binding ratios (r, thiol vs. aniline unit of the polymer) of ca. 0.50 at saturation for these thiols. Both PANIpost–thiol and PANIpoly–thiol composite films from the carboxylated thiols showed a controllable electroactivity of the PANI moiety in neutral even weakly alkaline phosphate buffer solutions (PBS), with maximum electroactivity roughly at r = 0.11 for PANIpost–MSA or at r = 0.21 for PANIpost–TGA. The PANI–thiol interaction was also supported by experiments of scanning electron microscopy, electrochemical surface plasmon resonance, Fourier transform infrared spectroscopy and ultraviolet-visible spectroscopy, and the interaction mechanism is briefly discussed. The PANIpost–thiol and PANIpoly–thiol composite films from the carboxylated thiols effectively electrocatalyzed the oxidation of ascorbic acid in pH = 7.3 PBS, and the PANIpost–thiol exhibited electrocatalytic activity higher than the relevant PANIpoly–thiol under our experimental conditions. The covalent anchoring of anionic thiol groups on the PANI backbone to prepare electroactive PANI in neutral solutions is conceptually new and may be extended to the development of new functional materials from many other conducting polymers and thiols for wide applications in catalysis, biosensing, molecular electronics, and so on.