According to one embodiment, an ECG waveform detecting apparatus includes an input circuit and processing circuitry. The input circuit receives an ECG signal. The processing circuitry performs first detection of a specific waveform included in the ECG signal, performs update processing of a detection parameter for detecting the specific waveform based on a part of the specific waveform or result of the first detection, performs second detection of the specific waveform from the ECG signal by using the detection parameter after the update processing, and generates a synchronization signal based on information on the second detection.