ABSTRACT We present a new physically motivated model for estimating the molecular line emission in active galaxies. The model takes into account (i) the internal density structure of giant molecular clouds (GMCs), (ii) the heating associated with both stars and the active galactic nuclei (AGNs), respectively, producing photodissociation regions (PDRs) and X-ray-dominated regions (XDRs) within the GMCs, and (iii) the mass distribution of GMCs within the galaxy volume. The model needs, as input parameters, the radial profiles of molecular mass, far-UV flux and X-ray flux for a given galaxy, and it has two free parameters: the CO-to-H2 conversion factor αCO, and the X-ray attenuation column density NH. We test this model on a sample of 24 local (z ≤ 0.06) AGN-host galaxies, simulating their carbon monoxide spectral-line energy distribution (CO SLED). We compare the results with the available observations and calculate, for each galaxy, the best (αCO, NH) with a Markov chain Monte Carlo algorithm, finding values consistent with those present in the literature. We find a median αCO = 4.8 M⊙ (K km s−1 pc2)−1 for our sample. In all the modelled galaxies, we find the XDR component of the CO SLED to dominate the CO luminosity from Jupp ≥ 4. We conclude that, once a detailed distribution of molecular gas density is taken into account, PDR emission at mid-/high-J becomes negligible with respect to XDR.