The cavitation effect, as a kind of geochemical phenomenon, widely exists under intense hydrodynamic circumstances, turbulent streams, earthquakes, or waterfalls and anywhere else where a shear force abruptly breaks the continuity of liquid surfaces. The development of an efficient and cheap sonocatalyst is hence one of the effective ways to utilize the cavitation effect to harness energy. In this study, we use a flower-like cobalt nitride nanowires catalyst with rich nitrogen-vacancy nanostructures to achieve efficient sonocatalytic hydrogen production in various water resources. In pure water, an exceptional sonocatalytic hydrogen generation rate of 28.5 μmol g–1 h–1 is delivered by the flower-like cobalt nitride nanowires. More interestingly, hydrogen peroxide, a high-value oxidation product, is also detected in the liquid phase after ultrasonic wave vibrations. Due to the acid/alkali resistance and corrosion resistance of the transition metal nitrides (TMNs), cobalt nitride nanowires can also produce hydrogen in acidic water, alkaline water, seawater, and wastewater. Enriched active sites in cobalt nitride nanowires greatly promote the recombination of radicals generated by the implosion of cavitation bubbles, which promotes sonochemical reaction efficiency. In addition, the cobalt nitride nanowire catalyst displays excellent stability and reusability during the sonochemical catalytic reaction. The findings are anticipated to be useful for further research on transition metal nitride materials as prospective sonocatalysts for energy conversion and environmental remediation.