This paper applied Ant Colony Optimization (ACO) to develop a resource constraints scheduling model to achieve the resource allocation optimization and the shortest completion time of a project under resource constraints and the activities precedence requirement for projects. Resource leveling is also discussed and has to be achieved under the resource allocation optimization in this research. Testing cases and examples adopted from the international test bank were studied for verifying the effectiveness of the proposed model. The results showed that the solutions of different cases all have a better performance within a reasonable time. These can be obtained through ACO algorithm under the same constrained conditions. A program was written for the proposed model that is able to automatically produce the project resource requirement figure after the project duration is solved.