Currently, the decision boundary of the multi-class anomaly detection algorithm based on deep learning does not sufficiently capture the positive class region, posing a risk of abnormal sample features falling into the domain of normal sample features and potentially leading to misleading outcomes in practical applications. In response to the above problems, this paper proposes a new method called multi-class hypersphere anomaly detection (MMHAD) based on the edge outlier exposure set and margin. The method aims to utilize convolutional neural networks for joint training of all normal object classes, identifying a shared set of outlier exposures, learning compact identification features, and setting appropriate edge parameters to guide the model in mapping outliers outside the hypersphere. This approach enables more comprehensive detection of various types of exceptions. The experiments demonstrate that the algorithm is superior to the most advanced baseline method, with an improvement of 26.0%, 8.2%, and 20.1% on CIFAR-10 and 14.8%, 12.0%, and 20.1% on FMNIST in the cases of (2/8), (5/5), and (9,1), respectively. Furthermore, we investigate the challenging (2/18) case on CIFAR-100, where our method achieves approximately 17.4% AUROC gain. Lastly, for a recycling waste dataset with the (4/1) case, our MMHAD yields a notable 22% enhancement in performance. Experimental results show the effectiveness of the proposed model in multi-classification anomaly detection.