Gait phase detection is an essential procedure for amputated person with an artificial leg to walk naturally. However, a high-performance gait phase detection system is challenging due to (1) the complexity of surface electromyography (sEMG) and redundancy among the numerous features; (2) a robust recognition algorithm which can satisfy the real-time and high accuracy requirement of the system. This paper presents a gait phase detection method based on feature selection and ensemble learning. Four kinds of features extraction methods of sEMG, including time, frequency, time/frequency domain and entropy, are quantitatively analyzed by statistical analysis and calculation complexity to select the best features set. Furthermore, a multiclass classifier using Light Gradient Boosting Machine (LightGBM) is first introduced in gait recognition for discriminating six different gait phases with an average accuracy (94.1%) in a reasonable calculation time (85Â ms), and the average accuracy is 5%, which is better than the traditional multiple classifiers decision fusion model. The proposed robust algorithm can effectively reduce the effect of speed on the result, which make it a perfect choice for gait phase detection.