Photovoltaic (PV) inverters can provide ancillary services to the electrical grid, such as harmonic current compensation (HCC), reactive power injection, power smoothing and frequency regulation. Even though this extra functionality can improve the grid power quality, the reliability of the power electronics components of the PV inverter can be affected. Some studies performed further analysis in the semiconductor devices operating as HCC. However, there is a lack in the literature exploring the HCC effect in the dc-link capacitors. Thus, the main objective of this work is perform a further analysis in the HCC operation effects on the dc-link capacitor. The influences of the harmonic order, amplitude and phase angles on the dc-link capacitor are explored. In addition, thermal experimental results of the dc-link capacitor temperatures are performed to evidence the simulation results. Based on the results obtained in this work, the HCC affects the dc-link capacitor power losses and lifetime consumption. The harmonic order directly affects the dc-link power losses and it is higher when the 5 th and 7 th harmonic orders are compensated simultaneously. In addition, the compensation of 7 th harmonic order presents higher power losses than the 5 th harmonic component. It was also observed that harmonic phase-angle does not present significant effect in the dc-link capacitor power losses.