The cultivation of Ipomoea reptans Poir in Balongpanggang District, Gresik Regency, serves as an adaptive response to post-harvest drought in rice fields and reflects the potential for sustainable agriculture. This study aims to analyse the mediating role of the Farmers’ Group Association (Gapoktan) in the relationship between social capital and farmer motivation towards sustainable farming practices. A mixed-methods design was employed, involving quantitative data from 35 farmers using a census approach and qualitative data from 39 Focus Group Discussion (FGD) participants. The quantitative data were analysed using Structural Equation Modelling–Partial Least Squares (SEM–PLS), while the qualitative data were examined thematically. Results revealed that social capital had a significant positive effect on Gapoktan partnerships (O = 0.482, p < 0.001), and Gapoktan partnerships significantly influenced sustainable agriculture (O = 0.516, p < 0.001). Mediation analysis confirmed that Gapoktan strongly mediated the relationship between social capital and sustainable agriculture (O = 0.249, p = 0.001). However, farmer motivation had a positive but insignificant effect on both Gapoktan partnerships (p = 0.190) and sustainable agriculture through Gapoktan mediation (p = 0.279). The study concludes that sustainable I. reptans Poir farming is primarily driven by social capital channelled through Gapoktan partnerships, while motivation alone is insufficient without institutional reinforcement. Strengthening Gapoktan’s strategic role in collective marketing, capital access, and knowledge transfer is essential to transform existing social solidarity into a sustainable, inclusive agribusiness ecosystem.