In view of problems of high cost, high consumption of natural resources and serious environmental pollution existed in common coal preparation methods and X-ray coal preparation method was easy to occur identification errors for different thickness of coal and gangue, a separation system of coal and gangue based on X-ray and optical fiber sensor was designed. Firstly, X-ray images of coal and gangue are obtained by X-ray scanning, which are processed to get gray value of the images. Then thickness of coal and gangue are measured by optical fiber sensor. Finally, identification threshold value of coal and gangue is determined by integrating gray value and thickness, so as to realize separation of coal and gangue. The experimental result shows that the system can identify coal and gangue effectively through the identification threshold value of coal and gangue.