The invention provides a method for acquiring two-dimensional J-resolved spectroscopy of magnetic resonance by single sweeping. Through a module executing 'sampling and 180-degree pulsing' repeatedly after exciting a magnetization vector to an XY plane, data needed for two-dimensional J- resolved spectroscopy can be acquired by only one-time excitation. In order to acquire better resolution on a direct dimension F2 of a spectrogram, raw data are predicted along the direct dimension F2, and signals are attenuated completely. Compared with a traditional method, the method has the advantage that time of experiment is shortened greatly; compared with a previous spatial encoding method, the method is equivalent to the previous method in experimental time, can provide higher signal to noise ratio and resolution, and is simple in sequence and convenient to operate; compared with a one-dimensional spectroscopy method, the method is equivalent to the method in experimental time, but can provide finer J-coupling split peak information. The simple and efficient method plays an important role in metabolite batch testing, organic chemistry reaction and bioassay.