Based on the traditional sorting methods of logistics, this paper presents a joint detection and sorting method for dangerous chemicals based on X-ray and Raman spectrum. First, the traditional wavelet transform method is improved to obtain a shift-invariant wavelet signal noise reduction algorithm, and the improved wavelet noise reduction method is applied to the Raman spectrum signal noise reduction of dangerous chemicals. The validity of the proposed method is verified with Raman spectrum analysis of ethanol and potassium nitrate. A new type of logistics sorting system is designed. The X-ray and Raman spectrum are used for the primary and secondary detection of dangerous goods respectively, and the composition of dangerous chemicals is determined by comparing the diffraction peak of the detected goods with the diffraction peak of standard chemical functional group. The designed dangerous chemicals sorting system can effectively reduce the transportation risk of dangerous chemicals. The research conclusions can provide theoretical reference for rapid sorting of storage and safe transportation of logistics.