Context. M dwarfs are an important source of information when studying and probing the lower end of the Hertzsprung-Russell (HR) diagram, down to the hydrogen-burning limit. Being the most numerous and oldest stars in the galaxy, they carry fundamental information on its chemical history. The presence of molecules in their atmospheres, along with various condensed species, complicates our understanding of their physical properties and thus makes the determination of their fundamental stellar parameters more challenging and difficult. Aims. The aim of this study is to perform a detailed spectroscopic analysis of the high-resolution H-band spectra of M dwarfs in order to determine their fundamental stellar parameters and to validate atmospheric models. The present study will also help us to understand various processes, including dust formation and depletion of metals onto dust grains in M dwarf atmospheres. The high spectral resolution also provides a unique opportunity to constrain other chemical and physical processes that occur in a cool atmosphere.Methods. The high-resolution APOGEE spectra of M dwarfs, covering the entire H-band, provide a unique opportunity to measure their fundamental parameters. We have performed a detailed spectral synthesis by comparing these high-resolution H-band spectra to that of the most recent BT-settl model and have obtained fundamental parameters such as effective temperature, surface gravity, and metallicity (T eff , log g and [Fe/H], respectively). Results. We have determined T eff , log g and [Fe/H] for 45 M dwarfs using high-resolution H-band spectra. The derived T eff for the sample ranges from 3100 to 3900 K, values of log g lie in the range 4.5 ≤ log g ≤ 5.5, and the resulting metallicities lie in the range -0.5 ≤ [Fe/H] ≤ +0.5. We have explored systematic differences between effective temperature and metallicity calibrations with other studies using the same sample of M dwarfs. We have also shown that the stellar parameters determined using the BT-Settl model are more accurate and reliable compared to other comparative studies using alternative models.