The shallow decay phase or plateau phase of early afterglows of gamma-ray bursts (GRBs), discovered by Swift, is currently understood as being due to energy injection to a relativistic blast wave. One natural scenario for energy injection invokes a millisecond magnetar as the central engine of GRBs, because the conventional model of a pulsar predicts a nearly constant magnetic-dipole-radiation luminosity within the spin-down timescale. However, we note that significant brightening occurs in some early afterglows, which apparently conflicts with the above scenario. Here we propose a new model to explain this significant brightening phenomena by considering a hyperaccreting fallback disk around a newborn millisecond magnetar. We show that for typical values of the model parameters, sufficient angular momentum of the accreted matter is transferred to the magnetar and spins it up. It is this spin-up that leads to a dramatic increase of the magnetic dipole radiation luminosity with time and thus significant brightening of an early afterglow. Based on this model, we carry out numerical calculations and fit well early afterglows of 12 GRBs assuming sufficiently strong fallback accretion. If the accretion is very weak, our model turns out to be the conventional energy-injection scenario of a pulsar. Therefore, our model can provide a unified explanation for the shallow decay phase, plateaus, and significant brightening of early afterglows.