Context. Weak gravitational lensing is a powerful tool for probing the distribution of dark matter in the Universe. Mass-mapping algorithms, which reconstruct the convergence field from galaxy shear measurements, play a crucial role in extracting higher-order statistics from weak-lensing data to constrain cosmological parameters. However, only limited research has been done on whether the choice of mass-mapping algorithm affects the inference of cosmological parameters from weak-lensing higher-order statistics. Aims. This study aims to evaluate the impact of different mass-mapping algorithms on the inference of cosmological parameters measured with weak-lensing peak counts. Methods. We employed Kaiser-Squires, inpainting Kaiser-Squires, and MCALens mass-mapping algorithms to reconstruct the convergence field from simulated weak-lensing data, generated from cosmo-SLICS simulations. Using these maps, we computed the peak counts and multi-scale wavelet peak counts as our data vectors. We performed Bayesian analysis with Markov chain Monte Carlo sampling to estimate the posterior distributions of cosmological parameters, including the matter density, amplitude of matter fluctuations, and dark energy equation of state parameter. Results. Our results indicate that the choice of mass-mapping algorithm significantly affects the constraints on cosmological parameters, with the MCALens method improving constraints by up to 157% compared to the standard Kaiser-Squires method. This improvement arises from MCALens’s ability to better capture small-scale structures. In contrast, inpainting Kaiser-Squires yields constraints similar to Kaiser-Squires, indicating a limited benefit from inpainting for cosmological parameter estimation with peaks. Conclusions. The accuracy of mass-mapping algorithms is critical for cosmological inference from weak-lensing data. Advanced algorithms like MCALens, which offer superior reconstruction of the convergence field, can substantially enhance the precision of cosmological parameter estimates. These findings underscore the importance of selecting appropriate mass-mapping techniques in weak-lensing studies to fully exploit the potential of higher-order statistics for cosmological research.