Agriculture is a significant contributor to deforestation, biodiversity loss, and greenhouse gas emissions. However, agricultural productivity is most likely to suffer adverse consequences of climate change. Here, we examine tensions between agriculture, food security, and forests, including the positive contributions forests make to food security, and how these contributions will be affected by a changing climate. We divide the roles and functions of forests into three distinct categories: the provisioning function, including that of food and income; the protective function related to ecosystem service provision and the restorative potential of forests; and the restorative capacity of forests that can be leveraged through increasing the availability of trees and forests in agricultural landscapes. Such contributions include climate change mitigation via sequestration and the restoration of degraded agricultural land.