This study investigates the effects of climate change and carbon dioxide (CO₂) emissions on crop production in Tunisia over the period 1996–2024. Given the increasing challenges posed by climate variability and environmental degradation to agricultural sustainability, this research contributes to the achievement of the United Nations Sustainable Development Goals (SDGs), particularly SDG 2 (Zero Hunger), SDG 13 (Climate Action), and SDG 15 (Life on Land). To capture both linear and asymmetric dynamics, the Nonlinear Autoregressive Distributed Lag (NARDL) model is employed to examine the impacts of average temperature, precipitation, and CO₂ emissions on agricultural productivity. The empirical findings reveal that, in the short run, rising CO₂ emissions significantly reduce crop production, highlighting the immediate adverse effects of environmental degradation on Tunisia’s agricultural sector. In the long run, CO₂ emissions exert a substantial and persistent negative impact on agricultural productivity, suggesting that continued environmental pressures may threaten food security and sustainable agricultural development. Conversely, fertilizer use has a significant positive effect on crop production, underscoring its role in supporting agricultural output and resilience. Although arable land, average temperature, and precipitation exhibit positive associations with crop production, their estimated effects are not statistically significant. Furthermore, the NARDL analysis uncovers important asymmetric relationships, demonstrating that positive and negative shocks in climate-related variables and CO₂ emissions affect agricultural output with differing magnitudes and directions. These findings emphasize the vulnerability of Tunisia’s agricultural system to climate change and environmental degradation while highlighting the importance of adaptive agricultural practices and effective climate mitigation policies. The study recommends strengthening investments in climate-smart agriculture, sustainable land management, and low-carbon development strategies to enhance agricultural resilience, support long-term food security, and advance progress toward the SDGs.