International audienceHeterogeneity is an ubiquitous aspect of adsorption, often modifying substantially the observed behavior of the adsorbate-adsorbent system. In this paper, the influence of heterogeneity is explicitly analyzed for the case of the adsorption of molecular hydrogen onto nanoporous carbon. Grand Canonical Monte Carlo simulations were used to study the mechanism of adsorption in models of the adsorbate that include both energetic and structural modifications of graphene-based slit pores. In particular, a partial substitution of carbons by boron modifies both the symmetry of the energy landscape and strength of hydrogen physisorption; which results in considerable increases of the amount of adsorbed gas without major modifica...