The invention discloses a detection device for the ripeness degree of watermelons and pesticide residue. The detection device comprises a conveyor belt, a base plate, a spring, an elastic baffle plate, a connecting plate, a motor, universal wheels, an operation platform, a first detection box, a far infrared light source, a metal ball, an electromagnet, a temperature sensor, a sound level meter, an optical fiber detector, a computer, a single chip microcomputer, a voice signal acquisition card, a spectrograph, a second detection box, a detection needle, an enzyme electrode sensor, a first hydraulic retractable rod, a hydraulic cylinder, a pneumatic sliding rail, a sliding block, a second hydraulic retractable rod, a third hydraulic retractable rod, a fixed claw and an air cylinder. According to the detection device disclosed by the invention, indexes including the sugar content, acidity, solid-state dissolved matters and the like of the watermelons are detected by adopting a far infrared manner, so that the ripeness degree of the watermelons is determined; in a detection process, the elastic baffle plate is used for fixing and is suitable for fixing the watermelons with different sizes; meanwhile, the metal ball is used for carrying out dual detection in a knocking manner and the accuracy and reliability of the ripeness degree of the detected watermelons are ensured.