An optimal active power filter (APF) based on modular multilevel converter (MMC) without load current and lower arm current sensors is proposed. Its control algorithm mainly includes predictive harmonic current control, fundamental frequency control, and dc voltage control. Comparing to direct current control, the first two subcontrollers transfer the harmonic and fundamental active/reactive power current to voltage references, which are suitable to generate the modulation signals to MMCs as well as two-level converters. Their full digital optimization structures combined with the MMC voltage and current control are detail discussed and implemented on field programmable gate array. The synthesis result indicates a low hardware resource utilization and calculation delay of the designed controller. The experimental results on an MMC-based APF prototype verified the static and dynamic performances of the proposed algorithm.