The invention relates to a multi-channel detection foreign fiber sorting machine with a CCD camera and an ultrasonic sensor. The machine comprises a box body, wherein the centre region of the box body is provided with a cotton passage pipeline; the end, positioned in the box body, of the cotton passage pipeline is provided with a connecting pipe; the connecting pipe is provided with a foreign fiber pipeline and an outlet pipeline; the junction between the connecting pipe and the foreign fiber pipeline is provided with a high-pressure electromagnetic valve; the inlet of the high-pressure electromagnetic valve is connected with a high-pressure air storage tank; the two sides, corresponding to the cotton passage pipeline, in the box body are both provided with mounting blocks; the mounting blocks are provided with a first color linear array scanning CCD camera, a second color linear array scanning CCD camera, a first black and white linear array scanning CCD camera and a second black and white linear array scanning CCD camera; the cotton passage pipeline is also provided with a first lighting device and a second lighting device; and the end, corresponding to the adjacent cotton passage pipeline, of the connecting pipe is provided with the ultrasonic sensor. The machine has large cotton passage number, high sorting speed, high sorting efficiency, high anti-jamming capacity, high detection accuracy, safety and reliability.