A lightweight and portable spectrometer is desirable for miniaturization and integration. The unprecedented capability of optical metasurfaces has shown much promise to perform such a task. We propose and experimentally demonstrate a compact high-resolution spectrometer with a multi-foci metalens. The novel metalens is designed based on wavelength and phase multiplexing, which can accurately map the wavelength information into its focal points located on the same plane. The measured wavelengths in the light spectra agree with simulation results upon the illumination of various incident light spectra. The uniqueness of this technique lies in the novel metalens that can simultaneously realize wavelength splitting and light focusing. The compactness and ultrathin nature of the metalens spectrometer render this technology have potential applications in on-chip integrated photonics where spectral analysis and information processing can be performed in a compact platform.