The validity of results in race walking is often questioned due to subjective decisions in the detection of faults. This study aims to compare machine-learning algorithms fed with data gathered from inertial sensors placed on lower-limb segments to define the best-performing classifiers for the automatic detection of illegal steps. Eight race walkers were enrolled and linear accelerations and angular velocities related to pelvis, thighs, shanks, and feet were acquired by seven inertial sensors. The experimental protocol consisted of two repetitions of three laps of 250 m, one performed with regular race walking, one with loss-of-contact faults, and one with knee-bent faults. The performance of 108 classifiers was evaluated in terms of accuracy, recall, precision, F1-score, and goodness index. Generally, linear accelerations revealed themselves as more characteristic with respect to the angular velocities. Among classifiers, those based on the support vector machine (SVM) were the most accurate. In particular, the quadratic SVM fed with shank linear accelerations was the best-performing classifier, with an F1-score and a goodness index equal to 0.89 and 0.11, respectively. The results open the possibility of using a wearable device for automatic detection of faults in race walking competition.