An electrochemiluminescence (ECL) aptasensor for the detection of the milk protein allergen β-lactoglobulin (β-LG) using nanocomposite as luminophore was fabricated. The Ru-AuNPs/GNP/Naf complex was formed by combining the Rubpy32+-AuNPs complex (Ru-AuNPs), prepared by modifying the negatively charged surface of gold nanoparticles (AuNPs) with positively charged Rubpy32+ through electrostatic interactions and the graphene nanoplatelets-Nafion (GNP/Naf) at a ratio of 2:1. The nanocomposite was coated on the surface of the screen-printed electrode (SPCE) through the film-forming properties of Nafion. A layer of chitosan (CS) was coated onto this modified electrode, and later amine-terminated β-LG aptamers were covalently attached to the CS/Ru-AuNP/GNP/Naf via glutaraldehyde (GLUT) cross-linking. When β-LG was incubated with the aptasensor, a subsequent decrease in ECL intensity was recorded. Under the optimal conditions, the ECL intensity of the aptasensor changed linearly with the logarithmic concentration of β-LG, in the range 0.1 to 1000 pg/ml, and the detection limit was 0.02 pg/mL (3σ/m). The constructed aptasensor displayed simple and fast determination of β-LG with excellent reproducibility, stability, and high specificity. Additionally, the proposed ECL aptasensor displayed high recoveries (92.5–112%) and low coefficients of variation (1.6–7.8%), when β-LG fortified samples were analyzed. Integrating Ru-AuNPs/GNP/Naf nanocomposite in the ECL aptasensor paves the way towards a cost-effective and sensitive detection of the milk allergen β-LG. Graphical abstract: [Figure not available: see fulltext.]