The scientific communitys interest on the stellar parameters of M dwarfs has been increasing over the last few years, with potential applications ranging from galactic characterization to exoplanet detection. The main motivation for this work is to develop an alternative and objective method to derive stellar parameters for M dwarfs using the H-band spectra provided by the Apache Point Observatory Galactic Evolution Experiment (APOGEE). Synthetic spectra generated with textit{iSpec}, textit{Turbospectrum}, textit{MARCS} models atmospheres and a custom made line list including over 1 000 000 water lines, are compared to APOGEE observations, and parameters are determined through $chi^2$ minimization. Spectroscopic parameters ($T_mathrm{eff}$, $[M/H]$, $log g$, $v_{mic}$) are presented for a sample of 313 M dwarfs, obtained from their APOGEE H-band spectra. The generated synthetic spectra reproduce observed spectra to a high accuracy level. The impact of the spectra normalization on the results are analyzed as well. Our output parameters are compared with the ones obtained with APOGEE Stellar Parameter and Chemical Abundances Pipeline (ASPCAP) for the same stellar spectrum, and we find that the values agree within the expected uncertainties. Comparisons with other previous near-infrared and optical literature are also available, with median differences within our estimated uncertainties found in most cases. Possible reasons for these differences are explored. The full H-band line list, the line selection for the synthesis, and the synthesized spectra are available for download, as are the calculated stellar parameters.