The need for highly performing and stable methods for mid-IR molecular sensing and metrology pushes towards the development of more and more compact and robust systems. Among the innovative solutions aimed at answering the need for stable mid-IR references are crystalline microresonators, which have recently shown excellent capabilities for frequency stabilization and linewidth narrowing of quantum cascade lasers with compact setups. In this work, we report on the first system for mid-IR high-resolution spectroscopy based on a quantum cascade laser locked to a CaF2 microresonator. Electronic locking narrows the laser linewidth by one order of magnitude and guarantees good stability over long timescales, allowing, at the same time, an easy way for finely tuning the laser frequency over the molecular absorption line. Improvements in terms of resolution and frequency stability of the source are demonstrated by direct sub-Doppler recording of a molecular line.