CO2 emissions account for 80% of greenhouse gases, which lead to the largest contributions to climate change. As the problem of CO2 emission becomes more and more prominent, research on sustainable technologies to reduce CO2 emission among environmental loads is continuously being conducted. In-situ production of precast concrete members has advantages over in-plant production in reducing costs, securing equal or enhanced quality under equal conditions, and reducing CO2 emission. When applying in-situ production to real projects, it is vital to calculate the optimal quantity. This paper presents a dynamic optimization model for estimating in-situ production quantity of precast concrete members subjected to environmental loads. After defining various factors and deriving the objective function, an optimization model is developed using system dynamics. As a result of optimizing the quantity by applying it to the case project, it was confirmed that the optimal case can save 7557 t-CO2 in CO2 emissions and 6,966,000 USD in cost, which resulted in 14.58% and 10.53% for environmental loads and cost, respectively. The model developed here can be used to calculate the quantity of in-situ production quickly and easily in consideration of dynamically changing field conditions.