In this paper, in order to improve network security, we propose an optimal placement of security virtual network function (security VNF) for service function chains based on the security level. In this method, an optimization problem is formulated for constructing service function chains based on the security level, and its near-optimal solution is derived with genetic algorithm. From the derived solution, security VNFs are placed to satisfy the security level of each service function chaining and many service function chains can be constructed to obtain higher revenue and less cost while considering the security level. We evaluate the performance of our proposed method with simulation, and the performance of this method is compared with the performance of other methods where security VNFs are selected based on those CPU resources. Numerical examples show that the proposed method is effective to construct service function chains by using security VNFs in order to improve network security.INDEX TERMS Network security, service function chain, virtual network function.