The invention provides an automatic vehicle-mounted soil nutrient detection and sampling device based on a near infrared spectrum technology. The automatic vehicle-mounted soil nutrient detection and sampling device comprises a movable platform, a control box, a soil collecting device, a soil storage device, a soil breaking device, an optical system, a GPS, a spectrograph, an industrial personal computer and a controller, wherein the movable platform is provided with traveling wheels, the control box is arranged on the movable platform, the soil collecting device and the soil storage device are arranged on the movable platform, the soil breaking device and the optical system are arranged on the bottom of the movable platform, the GPS is arranged on the top of the control box, and the spectrograph, the industrial personal computer and the controller are arranged in the control box. The automatic vehicle-mounted soil nutrient detection and sampling device is simple to operate; a plurality of processes such as spectrum collection, recording, clustering analysis, and collection of representative soil samples are controllable and continuous, the entire test process is environmentally-friendly and free of pollution, the test system is not damaged, and the continuous monitoring on a large-sized field can be realized; not only can the detection cost be reduced, but also the prediction precision of a model can be improved.