Detection of ST segment depression, elevation, or an arrhythmia in the ECG signal is very important for the early detection of a myocardial infarction. In this study, an algorithm based on Zhao-Atlas-Mark time-frequency distribution was developed in order to early detection of ST segment depression, elevation or arrhythmia on ECG signal. The performance evaluation of the algorithm was performedon a large database generated from MIT-BIH Arrhythmia, European ST-T and Long Term ST databases. The classification performance results were found as accuracy, sensitivity, specificity, negative predictive value and F score of 95.09%, 95.08%, 98.31%, 98.31% and 95.08%, respectively. Moreover, speed of the proposed algorithm is ideal for the decision support part of the telemedicine system.