With the increasingly fierce market competition, optimizing the construction time-cost of deep and large foundation pit construction projects has become one of the key factors for construction enterprises to remain invincible. By dynamically optimizing the time-cost, the optimal time corresponding to the lowest engineering cost can be found. Based on a comprehensive transportation hub project, considering the time value of capital and the reward and punishment of construction time, a time-cost dynamic optimization model is constructed. Relying on BIM technology, the feasibility of construction plan is analyzed from both qualitative and quantitative perspectives, and the project parameters and resource information is obtained accurately and quickly. Using the MATLAB program, time-cost optimization based on genetic algorithm is carried out, and the static and dynamic optimization results are compared. The results show that the dynamic optimization scheme reduces the total cost by 1.68% while reducing the total construction time by 8.47%. The dynamic optimization scheme extends the construction period by 2 days while reducing the total cost by 89,500 yuan compared to static optimization. The peak value of the fund demand curve before and after optimization has decreased from 128,000 yuan to 127,000 yuan. The time-cost dynamic optimization, considering the time value of capital is more in line with engineering reality, and the optimization results are more reliable and accurate. BIM technology can accurately and quickly obtain project parameters and resource information, solving problems such as complex processes in super deep excavation and huge engineering data statistics. The genetic algorithm can efficiently and accurately search for the optimal solution within the global domain. This study combines BIM technology with the genetic algorithm to solve the dynamic optimization problem of construction period cost for deep and large foundation pits. The research results of this study provide a theoretical reference for the optimization of schedule cost for similar projects.