An improved hybrid firefly algorithm with probability attraction model (IHFAPA) is proposed to solve the problems of low computational efficiency and low computational accuracy in solving complex optimization problems. First, the method of square-root sequence was used to generate the initial population, so that the initial population had better population diversity. Second, an adaptive probabilistic attraction model is proposed to attract fireflies according to the brightness level of fireflies, which can minimize the brightness comparison times of the algorithm and moderate the attraction times of the algorithm. Thirdly, a new location update method is proposed, which not only overcomes the deficiency in that the relative attraction of two fireflies is close to 0 when the distance is long but also overcomes the deficiency that the relative attraction of two fireflies is close to infinity when the distance is small. In addition, a combinatorial variational operator based on selection probability is proposed to improve the exploration and exploitation ability of the firefly algorithm (FA). Later, a similarity removal operation is added to maintain the diversity of the population. Finally, experiments using CEC 2017 constrained optimization problems and four practical problems in engineering show that IHFAPA can effectively improve the quality of solutions.