The present application provides a method and apparatus for detecting an ECG signal and an electronic device. According to an example of the method, an ECG signal with a set time length is segmented to obtain a first set number of single heartbeats; feature data corresponding to each of the first set number of single heartbeats is determined to obtain a first set number of feature data; and a pathological category of the ECG signal with the set time length is determined based on the ECG signal with the set time length and the first set number of feature data.