Climate change and urbanization present critical challenges to cities, requiring innovative energy and food security strategies. This study introduces a novel agrivoltaic system for building façades in Singapore’s dense urban context, addressing the trade-off between photovoltaic (PV) electricity generation and plant growth under shared solar exposure. By combining field experiments and advanced simulations, a genetic algorithm was employed to optimize PV arrangements, balancing solar exposure conflict for energy production and crop cultivation while also reducing building cooling load. Lettuce (Lactuca sativa) grown under PV shading yielded up to 120 g per plant, meeting commercial standards. Simulations revealed significant building energy benefits, with approximate annual savings of 50 kWh/m2 and CO2 reductions of 35 kg/m2 for every 100 m2 building block. This innovative system integrates renewable energy generation, urban agriculture, and passive cooling, maximizing the utility of vertical surfaces. By efficiently utilizing building surfaces, this approach offers a land-efficient strategy for integrating sustainable food and energy solutions in dense urban areas, contributing to urban resilience and further supporting sustainable development goals.