Poverty, food insecurity and climate change are global issues facing humanity, threatening social, economic and environmental sustainability. Greenhouse cultivation provides a potential solution to these challenges. However, some greenhouses operate inefficiently and need to be optimized for more economical and cleaner crop production. In this paper, an economic model predictive control (EMPC) method for a greenhouse is proposed. The goal is to manage the energy-water‑carbon-food nexus for cleaner production and sustainable development. First, an optimization model that minimizes the greenhouse's operating costs, including costs associated with greenhouse heating/cooling, ventilation, irrigation, carbon dioxide (CO2) supply and carbon emissions taking into account both the CO2 equivalent (CO2-eq) emissions caused by electrical energy consumption and the negative emissions caused by crop photosynthesis, is developed and solved. Then, a sensitivity analysis is carried out to study the impact of electricity price, supplied CO2 price and social cost of carbon (SCC) on the optimization results. Finally, a model predictive control (MPC) controller is designed to track the optimal temperature, relative humidity, CO2 concentration and incoming radiation power in presence of system disturbances. Simulation results show that the proposed approach increases the operating costs by R186 (R denotes the South African currency, Rand) but reduces the total cost by R827 and the carbon emissions by 1.16 tons when compared with a baseline method that minimizes operating costs only. The total cost is more sensitive to changes in SCC than that in electricity price and supplied CO2 price. The MPC controller has good tracking performance under different levels of system disturbances. Greenhouse environmental factors are kept within specified ranges suitable for crop growth, which increases crop yields. This study can provide effective guidance for growers' decision-making to achieve sustainable development goals.