Quantitative effective atomic number (\(Z_{eff}\)) inversion in energy-resolved X-ray projection imaging is affected by beam hardening and detector-response-induced spectral distortion. In this study, we propose a joint beam-hardening and detector-response correction framework for thickness-decoupled \(Z_{eff}\) inversion. A folded-spectrum forward model was established by incorporating the polychromatic X-ray source spectrum, material-dependent attenuation, and the detector response matrix of the energy-resolved photon-counting detector. Based on this model, a response-corrected spectral database was constructed using Monte Carlo simulation. The spectral mass-attenuation linearisation method was then used to reduce the nonlinear attenuation behavior caused by beam hardening, followed by \(Z_{eff}\) inversion through reliability-weighted least-squares spectral matching. Experimental validation was performed using standard low to middle \(Z_{eff}\) materials with theoretical \(Z_{eff}\) values ranging from 6.5 to 13.0 under four mass-thickness conditions \(\rho t\) = 3.0–9.0 g/cm2. The results showed improved thickness stability and quantitative agreement within the calibrated material and thickness range. The method was further applied to carbon-fiber-reinforced polymer specimens containing aluminium foil and optical-fiber inclusions. The resulting \(Z_{eff}\) maps provided material-dependent contrast beyond conventional grayscale attenuation, suggesting the potential of the proposed framework for qualitative or semi-quantitative material discrimination in composite non-destructive testing.