Magnetic electrochemiluminescent Fe3O4/CdSe–CdS nanoparticle/polyelectrolyte nanostructures have been synthesized and used to fabricate an electrochemiluminescence (ECL) immunosensor for the detection of carcinoembryonic antigen (CEA). CEA is a protein used as a biomarker for several cancers; particularly, to monitor response to treatment in colon and rectal cancer patients. The nanocomposites can be easily separated and firmly attached to an electrode owing to their excellent magnetic properties. This represents a promising advantage for bioassay applications. More importantly, the nanostructures exhibit intense and stable ECL emissions in neutral solution, which makes them ideal for ECL immunosensing. The 3-aminopropyltriethoxysilane (APS) polyelectrolyte shell on the nanostructure surface not only enhances the intensity and stability of the ECL signal, but also acts as a crosslinker for immunosensor fabrication. A CEA antibody immobilized onto a nanocomposite/APS/electrode with gold nanoparticles comprises the ECL immunosensor. The principle of ECL detection for CEA is based on a change in steric hindrance after immunoreaction, which leads to a decrease in ECL intensity. A wide detection range (0.064 pg ml−1–10 ng ml−1) and low detection limit (0.032 pg ml−1) are achieved. The immunosensor is highly sensitive and selective, and exhibits excellent stability and good reproducibility. It thus has great potential for clinical protein detection. In particular, this approach uses a novel class of bifunctional nanocomposites that display both intense ECL and excellent magnetism, which renders them suitable for a large range of bioassay applications.