In order to enhance the isolation security of 5G cryptographic computing, a network slice deployment method for cryptographic computing isolation was proposed in this paper. Firstly, based on hardware cryptographic virtualization technology, the Network Function Virtualization (NFV) architecture based on cryptographic card virtualization was designed in this paper. By analyzing the characteristics of cryptographic calculation of different Virtual Network Function (VNF) requirement in 5G network slices, the allocation policies of cryptographic resources are set. Then, the deployment method was established as a mixed integer programming model, taking the deployment cost as the objective function, and reducing the deployment cost of network slice by minimizing the objective function. Finally, genetic algorithm is used to simulate the model. Experiments show that the proposed method reduces the deployment cost on the premise of ensuring security.