In the Formula Student Racing Car, the anti-deformation ability of the frame will affect the four-wheel positioning parameters of the racing car, and then affect the handling and stability performance of the racing car. The quality of the frame directly determines the power and economy of the racing car, so the performance of the frame is very important to the performance of the race. In order to improve the performance of the frame and reduce the total weight of the frame, the research on the lightweight design of the frame is particularly important. In this paper, based on the variable density method, the global topology optimization of the frame is carried out to obtain the distribution of the frame material, realize the efficient use of the material, and improve the torsional stiffness of the frame. Based on the adjoint variable method, the sensitivity analysis of the frame is carried out. According to the sensitivity analysis results, the size of the frame is optimized. The total mass of the frame is reduced by 12.8 %, and the performance of the maximum displacement and maximum stress is improved. The lightweight design of the frame is realized as a whole.