Through symbiotic biological nitrogen fixation (BNF), grain legumes, such as groundnuts, can enhance soil nitrogen (N) and be an important source of N fertility, as well as a critical component of human nutrition and food security. Because legumes obtain N from soil N stocks as well as BNF, legume residues are key to capturing potential N benefits for soils, which may contribute to increased yields and food production. Here, we conducted a detailed survey at household and field level within a six-village corridor along the western boundary of Kibale National Park (KNP) in western Uganda. We focused on groundnut production and residue management practices and soil organic carbon (SOC) and total N (TN) in fields managed by 100 different households. We also determined SOC and TN in adjacent uncultivated KNP soils. We tested for relationships between socioeconomic factors and farmer groundnut management practices. We calculated a partial N balance and estimated potential N benefits under three scenarios for groundnut BNF. Within the study area, groundnut residue management varied greatly with 51% of surveyed farmers retaining residues on fields through spreading or incorporation, and 49% removing residues, either by transfer to banana groves or burning. Groundnut population density was relatively high with 43% of fields having >30 plants m−2. Despite providing net N inputs of up to 27 kg N ha−1, there was no observed effect of groundnut residue management practices on SOC, TN, or soil C:N ratios. Compared to uncultivated KNP soils, groundnut fields had lower mean levels of SOC and TN and wider C:N ratios. These values are consistent with cultivated soils; however, losses of SOC and TN were lower compared to losses previously reported for conversion from tropical forest to agricultural use. We found that farmer valuation and perception of groundnut residues were influential factors in residue management practices. Overall, we estimated that groundnut residues have the potential to contribute to SOC and TN stocks if retained in the field, but, conversely, removal will result in sizable losses. We find that both environmental and social contexts must be considered when recommending legumes for N provisioning services.