Provided is an ultrafine bubble generation device for aquaculture or wastewater treatment with which it is possible to efficiently cause ultrafine bubbles to be dissolved or to coexist, and to increase the concentration of a gas in the liquid. An ultrafine bubble generation device 1 for aquaculture or wastewater treatment provided with a channel 21 for channeling a liquid, a compression device 22 for pumping a gas into the channel 21, and a bubble generation medium 23 for releasing the gas pumped by the compression device 22 as ultrafine bubbles into the liquid in the channel 21, wherein the bubble generation medium 23 is formed from a carbon-based porous material and is disposed so as to be horizontal or below horizontal with respect to the direction of flow of the liquid in the channel 21.