Miniaturized spectrometers have been widely researched in recent years, but few studies are conducted with on-chip multimode schemes for mode-division multiplexing (MDM) systems. Here we propose an ultracompact mode-division demultiplexing spectrometer that includes branched waveguide structures and graphene-based photodetectors, which realizes simultaneously spectral dispersing and light fields detecting. In the bandwidth of 1500-1600 nm, the designed spectrometer achieves the single-mode spectral resolution of 7 nm for each mode of TE 1 -TE 4 by Tikhonov regularization optimization. Empowered by deep learning algorithms, the 15-nm resolution of parallel reconstruction for TE 1 -TE 4 is achieved by a single-shot measurement. Moreover, by stacking the multimode response in TE 1 -TE 4 to the single spectra, the 3-nm spectral resolution is realized. This design reveals an effective solution for on-chip MDM spectroscopy, and may find applications in multimode sensing, interconnecting and processing.