Using wearable robots is an effective means of rehabilitation for stroke survivors, and effective recognition of human motion intentions is a key premise in controlling wearable robots. In this paper, we propose an inertial measurement unit (IMU)-based gait phase detection system. The system consists of two IMUs that are tied on the thigh and on the shank, respectively, for collecting acceleration and angular velocity. Features were extracted using a sliding window of 150 ms in length, which was then fed into a quadratic discriminant analysis (QDA) classifier for classification. We recruited five stroke survivors to test our system. They walked at their own preferred speed on the level ground. Experimental results show that our proposed system has the ability of recognizing the gait phase of stroke survivors. All recognition accuracy results are above 96.5%, and detections are about 5–15 ms in advance of time. In addition, using only one IMU can also give reliable recognition results. This paper proposes an idea about the further research on human–computer interaction for the control of wearable robots.