The black soldier fly, Hermetia illucens (Linnaeus, 1758), is a saprophagous species used to decompose organic matter. This study proposes a distribution model of H. illucens to illustrate its current and future distribution. The methodology includes data collection from the Global Biodiversity Information Facility (GBIF), complemented with iNaturalist, manual expert curation of occurrence records, six species distribution models algorithms and one ensemble model. The average temperature of the driest annual quarter and the precipitation of the coldest annual quarter were the key variables influencing the potential distribution of H. illucens. The distribution range is estimated to decrease progressively and their suitable habitats could change dramatically in the future due to global warming. On the other hand, current optimal habitats would become uninhabitable for the species, mainly at low latitudes. Under this scenario, the species is projected to move to higher latitudes and elevations in the future. The results of this study provide data on the distribution of H. illucens, facilitating its location, management and sustainable use in current and future scenarios.