Harmonics generated from power electronic converters will impose significant power quality challenges to the electric grid onboard future aircraft. In this paper, we propose an innovative modulation scheme that enables using a buck-boost DC-DC converter as a harmonic absorber. To demonstrate the effectiveness of the proposed method, a hybrid power generation system involving a high-speed electrical generator and a high voltage battery is introduced. The electrical generator is connected to a DC bus through an AC-DC converter and the battery to the DC bus with a DC-DC converter. For the studied hybrid power generation system, it is identified that the first carrier frequency side-band harmonic (fc-3f0) from the AC-DC converter is most relevant and is targeted for cancellation. For the control of the DC-DC converter, a new modulation technique, called equal-gate-width (EGW) modulation is proposed. It allows active control of the magnitude and phase angle of some specific harmonic components from a DC-DC converter. By properly tuning the phase angle and amplitude, the controlled harmonics can thus be used to cancel harmonics from other converters on a common DC bus. Without losing generality, the paper focuses on the development of this specific harmonic cancellation scheme and the effectiveness of our proposed methods has been demonstrated using experimental results.