The identification of valid microseismic events is a crucial stage in the processing of microseismic data and plays a central role in subsequent monitoring and early warning of rockburst disasters. However, obtaining microseismic data is difficult, and manually identifying effective microseismic signals is even more challenging. Therefore, exploring high-precision intelligent classification methods with limited labeled data is necessary. In this study, we applied a self-supervised learning method based on contrastive learning to classify small samples of labeled data. Firstly, use large unlabeled data to pre-train SimCLR (a simple contrastive learning framework) for transfer learning to classify small sample labeled data. The classification accuracy was 87.14%, an increase of 11.3% compared to the supervised-deep-learning method. Furthermore, we directly applied the pre-trained SimCLR to the microseismic data of various projects, achieving a classification accuracy of 86.70%. This demonstrates strong classification performance and generalization and provides valuable technical support for the subsequent monitoring and warning of rockburst disasters.