In this paper, the design, fabrication and characterization of a MEMS thermal gas flow sensor with self-test function are presented. The flow sensor is composed of a platinum heater and thermopiles, where the heater is served as a heat source and the thermopiles are used for voltage output. In order to improve the performance of the flow sensor, the heavily doped N/P-polysilicon is utilized to form the thermocouple and XeF2 front-side isotropic etching is adopted to realize thermal isolation of the device. At the same time, the effects of the chip position in the gas channel and heater voltage on device performance are also studied from both experiment and simulation. Moreover, a self-test method and corresponding test system based on the thermal flow sensor are proposed, which use an equivalent heater voltage to simulate the gas flow rate for monitoring the dynamic response of the flow sensor to the gas. This method is simple and effective compared with traditional methods for detecting the performance flow sensors. In addition, the basic output performance of the flow sensor using nitrogen as the test gas is characterized. The experimental results show that the flow sensor owns a relatively high sensitivity of 123.006 mV (m/s)−1 (no amplification), a low response time of about 250 ms and good accuracy of ±1.97%.