We analyse two-dimensional near-infrared K-band spectra from the inner 660 × 315 pc2 of the Seyfert galaxy NGC 7582 obtained with the Gemini near-infrared spectrograph integral field unit at a spatial resolution of ≈50 pc and spectral resolving power R≈ 5900. The nucleus harbours an unresolved source well reproduced by a blackbody of temperature T≈ 1050 K, which we attribute to emission by circumnuclear dust located closer than 25 pc from the nucleus, with a total mass of ≈3 × 10−3 M⊙. Surrounding the nucleus, we observe a ring of active star formation, apparently in the Galactic plane, with a radius of ≈190 pc, an age of ≈5 Myr and a total mass of ionized gas of ≈3 × 106 M⊙. The radiation of the young stars in the ring accounts for at least 80 per cent of the ionization observed in the Brγ emitting gas, the remaining being due to the radiation emitted by the active nucleus. The stellar kinematics was derived using the CO absorption band at 2.29 μm and reveals: (i) a distorted rotation pattern in the radial velocity field with kinematic centre apparently displaced from the nuclear source by a few tens of parsec; (ii) a high-velocity dispersion in the bulge of σ*= 170 km s−1 and (iii) a partial ring of σ*= 50 km s−1, located close to the Brγ emitting ring, but displaced by ≈50 pc towards the nucleus, interpreted as due to stars formed from cold gas in a previous burst of star formation. The kinematics of the ionized gas shows a similar rotation pattern to that of the stars, plus a blueshifted component with velocities ≥ 100 km s−1 interpreted as due to an outflow along the ionization cone, which was partially covered by our observations. The mass outflow rate in the ionized gas was estimated as , which is one order of magnitude larger than the accretion rate to the active galactic nuclei (AGN), indicating that the outflowing gas does not originate in the AGN, but is instead the circumnuclear gas from the host galaxy being pushed away by a nuclear outflow. The flux distribution and kinematics of the hot molecular gas, traced by the H2 λ 2.22 μm emission line, suggest most of this gas is in the Galactic plane. An excess blueshift along PA ≈−70°, where a nuclear bar has been observed, can be interpreted as an inflow towards the nucleus. We thus conclude that the H2 kinematics traces the feeding of the AGN, while the ionized gas kinematics traces its feedback via the outflows. An AGN–starburst connection in the nucleus of NGC 7582 is supported by the ratio between the mass accretion rate and the star formation rate in the circumnuclear region of ≈0.26 per cent, which is close to the expected relation between the mass of the supermassive black holes and that of the host galaxy bulge in galaxies (the Magorrian relation).