Bubble velocity of gas–liquid two-phase flow in coalbed methane well is an key parameter for formulating coalbed methane drainage technology. In this paper, a self-powered bubble velocity sensor (GLT-TENG) of two-phase flow, which is composed of distributed copper electrodes and low-density polyethylene wrapped in an outer layer, is proposed and analyzed based on triboelectric nanogenerator. Test results show that the measurement range is 0–0.49 m s−1 with a measurement error less than 6% when the GLT-TENG is used to measure a single bubble, but the measurement errors are inversely proportional to the time interval (the ratio of distance to speed difference) between the two bubbles when the GLT-TENG is used to measure continuous bubbles, and the measurement accuracy can reach 100% when the bubble time interval is greater than 0.3 s. The maximum output can be achieved when the bubble velocity impulse is 6200 cm3 · cm s−1, that is, the maximum output voltage and current are 0.38 V and 6.3 nA, respectively, and the maximum output power is 0.64 pW when the external load is 50 MΩ. In addition, the temperature and pulverized coal tests show that GLT-TENG has a good signal-to-noise ratio in the coalbed methane well environment, which can meet the actual working conditions.