ABSTRACT We present the results of a study aiming at retrieving the fundamental parameters of M dwarfs from spectra secured with SPIRou, the near-infrared high-resolution spectropolarimeter installed at the Canada–France–Hawaii Telescope (CFHT), in the framework of the SPIRou Legacy Survey (SLS). Our study relies on comparing observed spectra with two grids of synthetic spectra, respectively, computed from PHOENIX and MARCS model atmospheres, with the ultimate goal of optimizing the precision at which fundamental parameters can be determined. In this first step, we applied our technique to 12 inactive M dwarfs with effective temperatures (Teff) ranging from 3000 to 4000 K. We implemented a benchmark to carry out a comparison of the two models used in this study. We report that the choice of model has a significant impact on the results and may lead to discrepancies in the derived parameters of 30 K in Teff and 0.05 dex to 0.10 dex in surface gravity (log g) and metallicity ($\rm {[M/H]}$), as well as systematic shifts of up to 50 K in Teff and 0.4 dex log g and $\rm {[M/H]}$. The analysis is performed on high signal-to-noise ratio template SPIRou spectra, averaged over multiple observations corrected from telluric absorption features and sky lines, using both a synthetic telluric transmission model and principal component analysis. With both models, we retrieve Teff, log g, and $\rm {[M/H]}$ estimates in good agreement with reference literature studies, with internal error bars of about 30 K, 0.05 dex, and 0.1 dex, respectively.