Novel hybrid nanocomposites based on polyaniline (PANi), hydrolyzed pectin (HPEc) and CdS nanoparticles (NPs) as electrochemiluminescent biomaterials were prepared. The samples were fabricated via heterogeneous chemical polymerization and studied by FTIR, XRD, SEM, EDX, UV/Vis, TGA and DMTA analyses. The CdS@HPEc-g-PANi nanocomposite was produced via in-situ coprecipitation of CdS NPs by directly addition of aqueous cadmium nitrate and sodium sulfide solutions into the polymerization system containing PANi and HPEc. The mCdS@HPEc-g-PANi nanocomposite was synthesized via a new two-step surface modification strategy. The as-prepared CdS NPs synthesized via chemical precipitation method were modified with epichlorohydrin as an organic reagent to obtain modified CdS (mCdS) and subsequently modified with HPEc and polymerized with aniline hydrochloride to produce mCdS@HPEc-g-PANi. The more smooth morphology of the mCdS@HPEc-g-PANi relative to the CdS@HPEc-g-PANi was approved by the SEM images. The cyclic voltammetry and electrochemical impedance spectroscopy analyses were performed on the samples to evaluate electrochemical properties and the results have indicated the reinforcing effect of the nanoparticles on the electrochemical properties of the nanocomposites. The electrical conductivity measurements by four probe method have shown significant increase of electrical conductivity in the presence of the CdS-nanoparticles. The CL experiments confirmed the chemiluminescence effect in the nanocomposites and also higher luminescence intensity for mCdS@HPEc-g-PANi relative to CdS@HPEc-g-PANi nanocomposite owing to better dispersion of CdS NPs in the former sample.