Hyperspectral image (HSI) classification is a fundamental research in the field of HSI processing, which has made great development, especially after deep learning-based method is widely used in this field. These methods are commonly starved for labeled samples. However, it is more challenging to obtain labeled samples than HSI in practice. Fortunately, self-supervised leaning (SSL) can take advantage of unlabeled data. In this paper, an HSI classification method based on masked self-supervised network (MSSL) is proposed. To obtain a representative and label-independent representation of HSI, a novel masking and reconstruction based proxy task is designed to accomplish SSL. Furthermore, a spatial masking strategy for HSIs is employed due to the high similarity of adjacent objects in remote sensing images. Experimental results on two benchmark HSI datasets indicate that the proposed MSSL can achieve better classification results with small number of labeled samples.