With increasing environment-related trade disputes, global attention on environmental issues in international trade has intensified. This study focuses on China, a major trading partner and a significant carbon emitter, and investigates how trade openness affects carbon emissions. Using data from 30 Chinese provinces, we provide an impact mechanism analysis covering nonlinear influence, the intermediary mechanism, and spatial spillover effects. We find that trade openness significantly reduces China's carbon emissions, and this holds up under various robustness tests. Trade openness promotes carbon emissions through scale effects, while restrains carbon emissions through environmental regulation. However, as the population ages, the effectiveness of trade openness in reducing emissions gradually decreases. Additionally, while trade openness lowers regional carbon emissions, it also leads to emission reductions in surrounding areas through spillover effects. Finally, the paper proposes targeted policy recommendations from international trade and the old-age dependency ratio.