The afterglows of gamma-ray bursts (GRBs) are believed to originate from the synchrotron emission of shock-accelerated electrons produced by the interaction between the outflow and the external medium. The accelerated electrons are usually assumed to follow a power-law energy distribution with an index of p. Observationally, although most GRB afterglows have a p larger than 2, there are still a few GRBs suggestive of a hard (p < 2) electron spectrum. The well-sampled broad-band afterglow data for GRB 091127 show evidence of a hard electron spectrum and strong spectral evolution, with a spectral break moving from high to lower energies. The spectral break evolves very fast and cannot be explained by the cooling break in the standard afterglow model, unless evolving microphysical parameters are assumed. In addition, the multi-band afterglow light curves show an achromatic break at around 33 ks. Based on the model of a hard electron spectrum with an injection break, we interpret the observed spectral break as the synchrotron frequency corresponding to the injection break, and the achromatic break as a jet break caused by the jet-edge effect. It is shown that the spectral evolution and the multi-band afterglow light curves of GRB 091127 can be well reproduced by this model.