A system for detecting bend of a rotating shaft in a magnetic bearing, comprising at least one first displacement sensor (1,3) disposed on one side of the rotating shaft, at least one second displacement sensor (2, 4) disposed on an opposite side of the rotating shaft, and a processor electrically connected with the first displacement sensor (1, 3) and the second displacement sensor (2, 4); the first displacement sensor (1, 3) is configured to measure a relative displacement between the rotating shaft and the first displacement sensor (1, 3); the second displacement sensor (2, 4) is configured to measure a relative displacement between the rotating shaft and the second displacement sensor (2, 4); 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 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, 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 and a minimum value of the center positions 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 (1, 3) is configured to measure a relative displacement between the rotating shaft and the first displacement sensor (1, 3); the second displacement sensor (2, 4) is configured to measure a relative displacement between the rotating shaft and the second displacement sensor (2, 4); 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 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, 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 and a minimum value of the center positions 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 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, 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 and a minimum value of the center positions 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.