Fault diagnosis for turnouts is crucial to the safety of railways. Existing studies on fault diagnosis depend on human experiences to select reference curves and require fault type information beforehand. Therefore, we proposed a turnout fault diagnosis method, named similarity function and fuzzy c-means based two-stage algorithm to detect faults and identify fault types in real time. First, the reference curve is selected from current curves representing turnout actions by K-means algorithm; then, a similarity function called Fréchet distance is used to distinguish normal and abnormal curves. Second, an improved fuzzy c-means algorithm is employed to cluster curves automatically. To be more specific, it can double-confirm the normal curves recognized in the first step as well as divide the abnormal curves into different types. Furthermore, possible causes for each fault type are inferred according to their curves. Our approach integrates fault detection and fault classification into one model and would better help the diagnosis of turnouts. The analysis results based on the similarity function and fuzzy c-means based two-stage algorithm algorithm indicate that the analyzed turnout fault types can be diagnosed automatically with high accuracy. Furthermore, since the proposed similarity function and fuzzy c-means algorithm does not need to know fault types in advance, it is applicable in identifying new fault types.