To achieve accurate PID control of polyvinyl chloride distillation process, a bacterial foraging optimization (BFO) based on particle swarm optimization (PSO) is proposed to search for the optimal PID parameters. The optimal values are found in the Kp, Ki, and Kd parameter spaces to achieve the optimal control effect of the system. Consider the historical optimal positions of particles and particle swarm, and improve the chemotaxis factor in the BFO algorithm. The simulation results show that PSO-BFO improves the performance of the control system, meets the requirements of automatic control, and improves accuracy, speed, and stability, making the system run better and solving the problem of substandard control in the PVC distillation process.