In this study, several IIR based filters are used for eliminating various noises from the Electrocardiogram (ECG) signal and the performance analysis of these filters are compared with each other. ECG is a signal resulted from the heart's functions. The ECG signal having electrophysiological information is used for the diagnosis of the heart diseases or monitoring the condition of the heart. The ECG data utilized in this study is taken from the MIT-BIH arrhythmia database recordings. It is aimed to remove the noises from the ECG signal employing the IIR based Butterworth, Chebyshev Type 1, Chebyshev Type 2 and Elliptic digital filters. The filters are configured depending on the noise types and the performance analysis of the filters is realized. A system is proposed selecting the filters having high performances and using them in the pre-processing stage of the R and QRS detection algorithm. And it is observed that the proposed system provides a satisfactory performance. The statistical parameters used for the performance analysis are Mean Square Error (MSE), Signal to Noise Ratio (SNR), Peak to Signal Noise Ratio (PSNR).