We solve the Schrödinger equation with a position-dependent mass (PDM) charged particle interacted via the superposition of the Morse-plus-Coulomb potentials and is under the influence of external magnetic and Aharonov–Bohm (AB) flux fields. The nonrelativistic bound state energies together with their wave functions are calculated for two spatially-dependent mass distribution functions. We also study the thermal quantities of such a system. Further, the canonical formalism is used to compute various thermodynamic variables for second choosing mass by using the Gibbs formalism. We give plots for energy states as a function of various physical parameters. The behavior of the internal energy, specific heat, and entropy as functions of temperature and mass density parameter in the inverse-square mass case for different values of magnetic field are shown.