Enhancing carbon sequestration capacity through effective forest management is a critical strategy for mitigating climate change. China has established public administrations, known as state-owned forest farms (SFFs), primarily to manage state-owned forests. This study examines the carbon sequestration effects of forestry investment made by 211 SFFs in Shaanxi Province from 2000 to 2018, using a panel fixed effects model and a panel threshold model. The findings reveal that SFF investment has a significant time-lag effect on carbon sequestration, with the marginal contribution peaking three years after the initial investment. Additionally, the impact of investment exhibits spatial heterogeneity, varying across regions due to differences in environmental and ecological conditions. Threshold effects are also identified, indicating that the effectiveness of carbon sequestration is constrained by the scale and structure of investment, with diminishing returns observed beyond optimal levels. Furthermore, we found that investment increases carbon sequestration mainly by expanding forest area and improving forest quality. These findings underscore the importance of cost-effectiveness analyses to optimize forestry investment decisions. SFFs are advised to prioritize appropriate investment timing, regions, scales, and structures to achieve optimal carbon sequestration benefits and maximize resource utilization, supporting sustainable forest management and climate change mitigation efforts.