The wide and even whole pH range electrochemiluminescence (ECL) is attractive for steroid estrogens detection under harsh conditions (such as strong acid and alkali). Herein, we presented an efficient europium-based metal-organic framework (Eu-MOF) as ECL luminophore, which has been synthesized via the specific 2, 4-bis(3, 5-dicarboxyphenylamino)-6-oltriazine (H4BDPO) ligand with acid-base buffering effect. The functional groups with weak acid and base endowed the H4BDPO with eight ionogenic group states, thereout different total charges of H4BDPO were derived, thus high and steady ECL signals of Eu-MOF were acquired under different environments with pH = 1.0–14.0. Most notably, combined with the means of UV–vis, fluorescence spectra, cyclic voltammetry (CV) and density functional theory (DFT) calculations, the Eu-MOF has been explored different luminescence mechanisms with variational total charges. The constructed ECL biosensor based on the Eu-MOF realized sensitive detection of trenbolone under wide pH range (In order to maintain the biological activity of antigen and antibody, the studied pH value is 5–8.5), in which the limits of detection were 3.95 fg/mL (pH = 5.0), 2.36 fg/mL (pH = 7.4) and 5.48 fg/mL (pH = 8.5) respectively. This work provides a considerable method to realize efficient trace detection of steroid estrogens under the wide or even whole pH conditions.