The present invention provides a SCMA codebook design method based on the moth-flaming algorithm, according to setting parameters in the SCMA codebook, setting user codewords, and determining optimized parameters; then constructing the SCMA codebook to be optimized and finally optimizing the SCMA codebook The SCMA codebook takes the minimum bit error rate as the criterion, and obtains the optimal parameter value of the parameter to be optimized through the moth-flame algorithm, so that the optimal SCMA codebook is obtained according to the optimal parameter value. The present invention can be applicable to the SCMA codebook design under different channels, under different channels, only need to change the channel parameter of SCMA in the bit error rate function f_BER; With the increase of the number of users, the complexity of the moth-flaming algorithm increases slowly, The implementation is simple; according to the simulation results, under the Gaussian channel and the Rayleigh channel, the bit error rate of the codebook obtained by the method of the present invention is significantly improved compared with other codebooks.