The document presents an automated algorithm for detecting electromyogram (EMG) noise in electrocardiogram (ECG) data using morphological operations. The algorithm efficiently filters out EMG noise to ensure clear ECG signals, utilizing techniques such as moving averaging and thresholding, and achieves a 100% detection rate with low computational complexity. This approach is suitable for application in large medical data collections and cloud-based medical systems.