A novel amperometric immunosensor has been developed by self-assembling gold nanoparticles (Au NPs) onto a toluidine blue–branched chitosan (CHIT–TB) modified electrode for the sensitive determination of hepatitis B surface antigen (HBsAg) as a model protein. The formation of CHIT–TB composite film not only effectively avoids the leakage of TB and retains its electrochemical activity, but also enhances the conductivity and charge–transport properties of the composite. Further adsorption of Au NPs into the CHIT matrix provides both the interactive sites for the immobilization of HBsAb and a favorable microenvironment to maintain the activity of the HBsAb, in addition it prevents leakage of HBsAb molecules from the CHIT–TB/Au NPs/HBsAb film structure efficiently. The morphologies and electrochemistry of the formed nanocomposite film were investigated by using scanning electron microscopy and electrochemical techniques including cyclic voltammetry and electrochemical impedance spectroscopy (EIS). The HBsAg concentration was measured through the decrease of amperometric responses in the corresponding specific binding of antigen and antibody. The decreased voltametric values were proportional to the HBsAg concentration in the range of 1 to 200 ng mL−1. The detection of HBsAg levels in five sera obtained from a hospital showed acceptable accuracy.