In this paper, a new method for clustering analysis of QRS complexes is proposed. We present an efficient Arrhythmia Clustering and Detection algorithm based on medical experiment and Ant Colony Optimization technique for QRS complex. The algorithm has been developed based on not only the general signal detection knowledge, but also on the ECG signal's specific features. Furthermore, our study brings the power of Ant Colony Optimization technique to the ECG clustering area. ACO-based clustering technique has also been improved using nearest neighborhood interpolation. At the beginning of our algorithm, we implement signal filtering, baseline wandering and parameter extraction procedures. Next is the learning phase which consists of clustering the QRS complexes based on the Ant Colony Optimization technique. A Neural Network algorithm is developed in parallel to verify and measure the success of our novel algorithm. The last stage is the testing phase to control the efficiency and correctness of the algorithm. The method is tested with MIT-BIH database to classify six different arrhythmia types of vital importance. These are normal sinus rhythm, premature ventricular contraction (PVC), atrial premature contraction (A PC), right bundle branch block, ventricular fusion and fusion. Our simulation results indicate that this new approach has correctness and speed improvements. (c) 2008 Elsevier Inc. All rights reserved.