With the successful launch of Swift satellite, more and more data of early X-ray afterglows from short gamma-ray bursts have been collected. Some interesting features such as unusual afterglow light curves and unexpected X-ray flares are revealed. Especially, in some cases, there is a flat segment in the X-ray afterglow light curve. Here we present a simplified model in which we believe that the flattening part is due to energy injection from the central engine. We assume that this energy injection arises from the magnetic dipole radiation of a millisecond pulsar formed after the merger of two neutron stars. We check this model with the short GRB 060313. Our numerical results suggest that energy injection from a millisecond magnetar could make part of the X-ray afterglow light curve flat.