Large-scale outflows driven by supermassive black holes are thought to have a fundamental role in suppressing star formation in massive galaxies. However, direct observational evidence for this hypothesis is still lacking, particularly in the young universe where star-formation quenching is remarkably rapid1–3, thus requiring effective removal of gas4 as opposed to slow gas heating5,6. Although outflows of ionized gas are frequently detected in massive distant galaxies7, the amount of ejected mass is too small to be able to suppress star formation8,9. Gas ejection is expected to be more efficient in the neutral and molecular phases10, but at high redshift these have only been observed in starbursts and quasars11,12. Here we report JWST spectroscopy of a massive galaxy experiencing rapid quenching at a redshift of 2.445. We detect a weak outflow of ionized gas and a powerful outflow of neutral gas, with a mass outflow rate that is sufficient to quench the star formation. Neither X-ray nor radio activity is detected; however, the presence of a supermassive black hole is suggested by the properties of the ionized gas emission lines. We thus conclude that supermassive black holes are able to rapidly suppress star formation in massive galaxies by efficiently ejecting neutral gas.