Nanomaterials with unique properties, such as good film-formation and plentiful active atoms, play a vital role in the construction of electrochemical sensors. In this work, anin situelectrochemical synthesis of conductive polyhistidine (PHIS)/graphene oxide (GO) composite film (PHIS/GO) was designed to construct an electrochemical sensor for the sensitive detection of Pb2+. Herein, GO as an active material can directly form homogeneous and stable thin films on the electrode surface because of its excellent film-forming property. Then GO film was further functionalized byin situelectrochemical polymerization of histidine to obtain plentiful active atoms (N). Due to strong van der Waals forces between GO and PHIS, PHIS/GO film exhibited high stability. Furthermore, the electrical conductivity of PHIS/GO films was greatly improved byin situelectrochemical reduction technology and the plentiful active atoms (N) in PHIS are profitable for adsorbing Pb2+from solution, tremendously enhancing the assay sensitivity. With the above unique property, the proposed electrochemical sensor showed high stability, a low detection limit (0.045 μg L−1) and a wide linear range (0.1–300 μg L−1) for the quantification of Pb2+. The method can also be extended to the synthesis of other film-forming nanomaterials to functionalize themselves and widen their potential applications, avoiding the addition of non-conductive film-forming substances.