Human-induced climate change is impacting regions worldwide, with agriculture being particularly vulnerable. The increase in carbon dioxide ( \(\hbox {CO}_2\) ) emissions is driving significant challenges, including global warming, rising sea levels, drought and frequent insect outbreaks. While moderate increase in \(\hbox {CO}_2\) and temperature may initially boost crop growth, exceeding critical threshold can disrupt photosynthesis and reduce leaf area and longevity, impairing productivity. This research work presents a novel mathematical model to explore the effects of elevated \(\hbox {CO}_2\) and temperature on crop yield and insect population dynamics. Our model assumes that rising \(\hbox {CO}_2\) levels increase surface temperature, which initially promote crop growth but eventually lead to a decline, once a critical temperature threshold is surpassed. Additionally, higher temperature accelerates insect population growth, which negatively impacts crop production. Model analysis reveals several bifurcations in the system. Further, by incorporating seasonal variations, we perform a comprehensive mathematical and numerical analysis of the associated nonautonomous system. Our analysis uncovers periodic solutions when the autonomous system is stable, and complex dynamics, including higher-period oscillations and chaos, when the autonomous system exhibits limit cycle oscillations. This study provides insights into the intricate interplay between \(\hbox {CO}_2\) level, global average temperature, insect population and crop yield, offering potential strategies to safeguard agricultural productivity in the face of climate change.