In the vegetable greenhouse control technology transformation, intelligent control will become the key technology of it. CO2 is one of the main sources of photosynthesis of crops. Due to the closure of the greenhouse, CO2 concentrations indoor will be much lower than outdoor without new CO2 injection, which is not conducive to crop growth. A neural network control algorithm based on structure and parameters of improved genetic algorithm training is proposed in this paper. It adopts a parallel fuzzy inference network, which has the characteristics of adaptive self-learning, and the controller obtained from the algorithm is used to control the input of CO2 in the greenhouse. This method overcomes the shortcomings of the need for large amounts of data transmission and accurate mathematical models of existing control methods and uses Matlab to simulate. The simulation results show that the method is effective.