Hyperspectral image (HSI) classification is an important part of its processing and application. Aiming at the problems of high data dimensionality and high spatial neighborhood correlation in HSI classification, we propose a spatial-spectral joint classification method of HSI with locality and edge preserving in this article. First, the input HSI is normalized, and the feature is extracted by principal component analysis. The first principal component image is taken as the guidance image. Second, guided filtering is used to extract the spatial features of each band separately. Then, the extracted spatial features are superimposed, and low-dimensional embedding is completed through local Fisher discriminant analysis. Finally, the obtained low-dimensional embedded features are input into a random forest classifier to get classification results. The experimental results of two HSI show that the proposed method achieves higher classification accuracy than other related methods. In the case of randomly selecting 10% and 1% samples from each class of ground object as training samples, the overall classification accuracy is improved to 99.57% and 97.79%, respectively. This method effectively uses the spatial and local information of the image in low dimensional embedding, and preserves the boundaries of the ground objects, thus improving the classification effect.