A system for detecting bend of a rotating shaft in a magnetic bearing, comprising at least one first displacement sensor disposed on one side of the rotating shaft , at least one second displacement sensor disposed on an opposite side of the rotating shaft , and a processor electrically connected with the first displacement sensor and the second displacement sensor ; the first displacement sensor is configured to measure a relative displacement between the rotating shaft and the first displacement sensor ; the second displacement sensor is configured to measure a relative displacement between the rotating shaft and the second displacement sensor ; the system characterised by the following: the processor comprises a calculating unit, a first judging unit and a second judging unit; the calculating unit is configured to calculate center positions (O) of the rotating shaft stopping at different positions during rotating a circle; the first judging unit is configured to judge whether the rotating shaft is bent or not according to a curve of changed center positions (O), output a test result of qualification if the rotating shaft is not bent, and send an instruction to the second judging unit if the rotating shaft is bent; the second judging unit is configured to, after receiving the instruction, judge whether a difference between a maximum value (D1) and a minimum value (D2) of the center positions (O) is less than a threshold value, output a test result of qualification of the rotating shaft if yes, and output a test result of disqualification of the rotating shaft if the difference is greater than the threshold value. the first displacement sensor is configured to measure a relative displacement between the rotating shaft and the first displacement sensor ; the second displacement sensor is configured to measure a relative displacement between the rotating shaft and the second displacement sensor ; the system characterised by the following: the processor comprises a calculating unit, a first judging unit and a second judging unit; the calculating unit is configured to calculate center positions (O) of the rotating shaft stopping at different positions during rotating a circle; the first judging unit is configured to judge whether the rotating shaft is bent or not according to a curve of changed center positions (O), output a test result of qualification if the rotating shaft is not bent, and send an instruction to the second judging unit if the rotating shaft is bent; the second judging unit is configured to, after receiving the instruction, judge whether a difference between a maximum value (D1) and a minimum value (D2) of the center positions (O) is less than a threshold value, output a test result of qualification of the rotating shaft if yes, and output a test result of disqualification of the rotating shaft if the difference is greater than the threshold value. the processor comprises a calculating unit, a first judging unit and a second judging unit; the calculating unit is configured to calculate center positions (O) of the rotating shaft stopping at different positions during rotating a circle; the first judging unit is configured to judge whether the rotating shaft is bent or not according to a curve of changed center positions (O), output a test result of qualification if the rotating shaft is not bent, and send an instruction to the second judging unit if the rotating shaft is bent; the second judging unit is configured to, after receiving the instruction, judge whether a difference between a maximum value (D1) and a minimum value (D2) of the center positions (O) is less than a threshold value, output a test result of qualification of the rotating shaft if yes, and output a test result of disqualification of the rotating shaft if the difference is greater than the threshold value. <EOS>