Handwritten digit recognition technology has been widely applied in various industries. However, due to the lack of contextual relationship between digits, the simplicity of digit strokes, and the small differences in glyph shapes, handwritten digit recognition remains a challenging task. As handwritten digit recognition belongs to the category of nonlinear classification problems, this paper employs Support Vector Machines (SVM) to accomplish the classification of handwritten digits, i.e., to find the optimal model for accurate classification of sample data. In this paper, a Radial Basis Function (RBF) is introduced as the kernel function to map the original sample data into a high-dimensional space where the data becomes linearly separable. An immune algorithm is used to continuously optimize the penalty parameter and kernel parameter, in order to obtain the optimal model for handwritten digit recognition. This model can be utilized to achieve handwritten digit recognition. Experimental results demonstrate that this method is effective and feasible, and can improve the accuracy of handwritten digit recognition to a certain extent.