For the first time, the electron density of the H + 2 molecule is analyzed when this system is confined by spheroidal walls with an infinite potential. Typically, this system is studied to obtain information of the total energy and its components or to gain insight of some expected values when such a system is squeezed by this kind of confinement. However, this is the first report where the electron density and its derivatives, under the quantum theory of atoms in molecules (QTAIM), are analyzed to study the chemical bond involved with this molecule. This confinement induces an unexpected behavior of the chemical bond and gives an idea about atomic interactions under high pressures, where the QTAIM approach indicates that the chemical bond disappears. For strong confinements, there is a significant contribution of the electron kinetic energy and the nuclear-electron energy contribution can be neglected. Under this situation, the confined H + 2 system is another example where the notion of the topological atom given by the QTAIM is no longer suitable.