Due to the complex working environment of the downhole, it is cumbersome and economically costly to power the sensing system using traditional methods. It is also crucial to monitor the speed of downhole motors. In this paper, a flexible-contact hybrid nanogenerator is proposed. It mainly collects the rotational energy of motors to provide power for other sensors and senses the speed of downhole motors. Firstly, the overall structural design of the hybrid nanogenerator is carried out. The hybrid nanogenerator consisting of an electromagnetic generator (EMG) and a rotating triboelectric nanogenerator (R-TENG) to complement each other's strengths are structurally optimized and performance tested separately. The maximal voltages of the EMG and R-TENG are 14.8 V and 230 V, and the maximal currents are 11 mA and 28 μA, respectively. Meanwhile, R-TENG errors are within 2 % when used for rotational speed sensing. The hybrid nanogenerator can charge a 100 μF capacitor to 6 V in 2 s, which has good charging performance and can power electronic devices such as Bluetooth thermo-hygrometer. The experiment findings indicate that the hybrid nanogenerator can not only complete the rotational speed sensing of the motors without an external power supply but also act as an energy harvester to collect the rotational energy of the motors and supply power to other tiny electronic devices downhole. It is a new type of power supply more suitable for downhole working conditions and provides a new idea of power supply and sensing downhole.