Optimization of integrated process planning and scheduling has important practical significance for balancing the load of the process resources, shortening production cycle, and reducing production costs. An optimization algorithm base on ant colony optimization (ACO) for integrated process planning and scheduling is proposed, which can handle the dynamic emergency situation. Firstly, the representation mechanisms of candidate operation and the scheduling scheme construction mechanism is proposed. Then, the process constraints and time cost functions are given; based on this, the mathematical model is constructed. The ACO algorithm has been developed to solve the proposed mathematical model of integrated process planning and scheduling. The optimization algorithm is divided into two stages: the scheduling scheme optimization algorithm and dynamic emergency situation handling mechanism. The scheduling scheme optimization algorithm is used to get feasible and optimize scheduling scheme, and the dynamic emergency situation handling mechanism is used to handle dynamic emergency situation, such as inserting new parts. An example is also provided to demonstrate the effectiveness of the algorithm, and the computing results show that the proposed algorithm performs well in searching the good scheduling scheme.