We present a hyperspectral image classification method based on sparse representation and superpixel segmentation. The presented method includes two main stages, which are sparse representation of extended multiattribute profiles (EMAPs) and superpixel segmentation of EMAPs. Specifically, we use the sparse representation of EMAPs to obtain the initial label of the pixel in the hyperspectral data. In addition, unsupervised superpixel segmentation is applied to EMAPs to generate the spatial constraint of the data. By refining the spectral classification results with the spatial constraints, the accuracy of classification is improved by a substantial margin. Our experiments reveal that the proposed approach yields state-of-the-art classification results for different hyperspectral datasets.