The brightness of the multi-wavelength afterglow of GRB 170817A is increasing unexpectedly even ∼160 days after the associated gravitational burst. Here we suggest that the brightening can be caused by a late-time energy injection process. We use an empirical expression to mimic the evolution of the injection luminosity, which consists of a power-law rising phase and a power-law decreasing phase. It is found that the power-law indices of the two phases are 0.92 and −2.8, respectively, with the peak time of the injection being ∼110days. The energy injection could be due to some kind of accretion, with the total accreted mass being ∼0.006M e . However, normal fall-back accretion, which usually lasts for a much shorter period, cannot provide a natural explanation. Our best-fit decay index of −2.8 is also at odds with the expected value of −5/3 for normal fall-back accretion. Noting that the expansion velocities of the kilonova components associated with GW170817 are 0.1-0.3 c, we argue that there should also be some ejecta with correspondingly lower velocities during the coalescence of the double neutron star (NS) system. They are bound by the gravitational well of the remnant central compact object and might be accreted at a timescale of about 100 days, providing a reasonable explanation for the energy injection. Detailed studies on the long-lasting brightening of GRB 170817A thus may provide useful information on matter ejection during the merger process of binary neutron stars.