This paper presents a condition diagnosis method for a roller bearing using the ant colony optimization (ACO). The symptom parameters in frequency domain are considered for reflecting the feature of vibration signals measured under different states. The states identification for machinery diagnosis is converted to clustering problem of different states. The distance-based diagnosis method, which distinguishes the machinery states by comparing the distance, is proposed using the ACO clustering algorithm and utilized to detect faults and recognize fault types. The analysis results demonstrate that the proposed method can recognize the faults types effectively.