© 2021, The Author(s). Human-wildlife coexistence is possible when animals can meet their ecological requirements while managing human-induced risks. Understanding how wildlife balance these trade-offs in anthropogenic environments is crucial to develop effective strategies to reduce risks of negative interactions, including bi-directional aggression and disease transmission. For the first time, we use a landscape of fear framework with Bayesian spatiotemporal modelling to investigate anthropogenic risk-mitigation and optimal foraging trade-offs in Critically Endangered western chimpanzees (Pan troglodytes verus). Using 12 months of camera trap data (21 camera traps, 6722 camera trap days) and phenology on wild and cultivated plant species collected at Caiquene–Cadique, Cantanhez National Park (Guinea-Bissau), we show that humans and chimpanzees broadly overlapped in their use of forest and anthropogenic parts of the habitat including villages and cultivated areas. The spatiotemporal model showed that chimpanzee use of space was predicted by the availability of naturalised oil-palm fruit. Chimpanzees used areas away from villages and agriculture more intensively, but optimised their foraging strategies by increasing their use of village areas with cultivated fruits when wild fruits were scarce. Our modelling approach generates fine-resolution space–time output maps, which can be scaled-up to identify human-wildlife interaction hotspots at the landscape level, informing coexistence strategy.