Incorporation of CdS nanoparticles is a suitable strategy to improve interfacial features, electrical and optical properties in polyaniline/graphene composites. In the other hand, use of biopolymers in addition to the improvement of processability of polyaniline composites leads to the creation of a developed functional surface owing to the affinity of biopolymers with the surfaces of inorganic nanomaterials. For this purpose in this work, we synthesized a hydrolyzed pectin-polyaniline copolymer (HP-PA) and its nanocomposites with graphene (GR) and CdS nanoparticles via a heterogeneous emulsion polymerization method. The samples were identified by FTIR, XRD, SEM, TEM, EDX, DSC and TGA analyses and investigated via electrical, electrochemical and chemiluminescence properties. Electrical conductivity showed a large increase about three orders of magnitude in conductivity of the nanocomposites compared to the copolymer sample. Electrochemical analyses (CV and EIS) demonstrated higher charge transfer ability for the nanocomposites than the HP-PA copolymer and a substantial improvement in electrochemical performance of GR/CdS@HP-PA due to the reinforcing effect of the CdS nanoparticles in electron transfer process. The optical properties of the samples exhibited a significant enhancement of chemiluminescence intensity for GR/CdS@HP-PA nanocomposite owing to the supporting effect of CdS nanoparticles in electron transfers and light emission.