To address the problem that the time-series characteristics of vibration data are lost in the process of feature extraction in the prototype network, and the distribution of samples in the metric space is not corrected which results in low model accuracy under few-shot task, this paper proposes a new boundary-enhanced prototype network with time-series attention for gearbox fault diagnosis. First, the time-series fusion features of the channels are obtained by building a time-series attention module to establish the time-series feature dependencies between channels. Then, after calculating the class prototypes, the near-neighbor boundary loss is added to correct the intra- and inter-class distributions of the fault features in the metric space to clarify the representation boundaries of the class prototypes. Finally, the fault diagnosis results are output by calculating the Euclidean distance between the test sample and the class prototype. The experiments show that the proposed method in this paper has higher fault diagnosis accuracy compared with other methods under small sample conditions.