Global climate change is a crucial environmental issue. Worldwide warming is primarily caused by carbon dioxide (CO<sub>2</sub>) emission levels. Agricultural production is among many economic activities driving CO<sub>2</sub> creation and environmental degradation. In this study, we aim to disclose the effect of agricultural production (date production) on the agricultural gross domestic product (AGDP) and the environment (CO<sub>2</sub> emissions). We collected data on date production, AGDP and CO<sub>2</sub> emissions from different resources covering the period from 1990 to 2019. To analyse the data, we used the Engle-Granger two-step procedure, autoregressive distributed lag (ARDL) bounds methods of analysis, regression analysis and forecasting tests. Results from fully modified ordinary least squares (FMOLS) and dynamic ordinary least squares (DOLS) analyses helped confirm the results of the ARDL model. The results revealed that there are long-run relationships between AGDP and date production and between CO<sub>2</sub> emissions and date production. The first result is consequent with theory and leads to economic growth, whereas the second result indicates a negative effect on the environment. To ascertain which production factors were responsible for this negative result, we ran a regression analysis, and the results indicated that the coefficient of electricity consumption (independent variable) was positive and highly significant in explaining the variability of CO<sub>2</sub> emissions. The results of the regression analysis also showed that agriculture affected the environment negatively through increasing CO<sub>2</sub> emissions during the study period. Forecasting analysis results showed a decrease in CO<sub>2</sub> emissions for the period from 2020 to 2026. The study results lead us to recommend that, to increase economic growth, date production should be increased along with the synchronised use of renewable sources of electricity. The governmental effort to sustain the environment also should be increased and continued through increasing the share of renewable electricity in total electricity consumption.