Mid-infrared precision spectroscopy has important applications in the fields of trace gas detection and the determination of fundamental physical constants. However, due to the limited commercialization of related technologies, there is a lack of narrow linewidth laser sources or linewidth narrowing approaches in the mid-infrared region, as well as stable mid-infrared frequency standards. The most commercialized and widely used mid-infrared laser source is the quantum cascade laser (QCL). But its free-running linewidth is more than MHz scale due to the influence of laser drive current noise and temperature fluctuation. This impedes the development of precision spectroscopy in this region. In this work, we introduce a technique for generating a narrow linewidth, stable mid-infrared laser by using optical feedback frequency locking, with a high-finesse mid-infrared ultrastable Fabry-Pérot cavity as the frequency reference. The optical cavity consists of two high reflectivity mirrors separated by ultra-low expansion (ULE) material with a low temperature expansion coefficient, and its temperature is precisely controlled. And the cavity is also surrounded in a vaccum cavity made of stainless steel. All these measures ensure the cavity length and its longitudinal mode stability. By using optical feecback, a QCL is locked to the cavity, which stabilizes the laser frequency and narrows the laser linewidth. In order to improve the long-term stability of the optical feedback, an active servo is leveraged to control the feedback phase. The error signal for the servo is obtained by using the method similar to the Pound-Derver-Hall locking. In this work, we first theoretically analyze the feasibility of laser to F-P cavity frequency locking by optical feedback. We propose the laser frequency response model with a linear F-P cavity under optical feedback, and analyze the influence of the direct cavity reflection on the laser frequency. Then the experimental demonstration is conducted. Firstly, we measure the reflectivity of the cavity mirror by using cavity ring-down spectroscopy, resulting in a cavity finesse of 30200 and a cavity mode linewidth of 49.7 kHz. After that, we successfully achieve optical feedback frequency locking, and consecutive cavity transmission is observed. The error signal for the control of the optical feedback phase is used to evaluate the locking performance by converting it into the laser frequency noise. By analyzing the noise spectral density, the QCL linewidth is narrowed to 0.3 Hz on a short timescale (< 10 ms). And the long-term stability is suspected to be dedicated by the temperature variation of the optical cavity, resulting in a laser frequency drift 20 kHz/12 h. The narrow linewidth stabilized mid-infrared laser source obtained with this technique is expected to serve as an effective frequency reference source for mid-infrared precision spectroscopic measurements.