Feeding the World while ensuring food security and biodiversity conservation is one of the sustainable development challenges. Integrating farming systems holds great promise for enhancing agricultural sustainability. To reach this goal, the domestic goat (Capra hircus) was integrated into the rice fish system. Four plots each 5 m × 10.65 m were made in two experimental systems, goat-rice-fish (GRF) and rice-fish (RF). We compared the impacts on rice productivity, fish growth performance, water quality, dietary patterns, and gut microbiota composition between both systems. On the one hand, the rice yield indicators, survival rate (SR), specific growth rate (SGR), pH temperature, dissolved oxygen (DO), total nitrogen (TN), and total phosphorus (TP) were compared. On the other hand, the frequency of occurrence (FOC) of food items of fish (Cyprinus carpio), and the microbiota communities in goat faeces (GoFe) and fish intestines were also examined and compared among both systems. The results showed that the rice yield, the number of filled spikelets per panicle, the number of panicles per land area, and the 1000-grain weight were significantly increased with the integration of goat in the rice-fish coculture system. The SR of fish under the goat-rice-fish system was 12.12% significantly higher than that of the fish under the rice-fish system, as well as the SGR of fish in the GRF system was 21.85% significantly higher than that of the rice-fish system. However, the water quality analyses indicated that the integration of goats significantly increased the concentration of TN and TP. The DO concentration in the GRF system was 25.93% lower than that in the RF system. Dietary analysis of the common carp in goat-rice fish systems revealed shifts in foraging behaviors and diet composition compared to the rice-fish system. Furthermore, the study showed higher diversity in the gut microbiota communities of fish in response to goat-rice-fish integration. In conclusion, this comprehensive investigation underscores the complex and interconnected dynamics within the goat-rice-fish integrated system. It highlights the importance of balanced management practices to harness the system's potential for improved rice yield, fish ecology, and water quality. The findings contribute to a deeper understanding of sustainable integrated farming practices and inform strategies for optimizing the productivity and ecological resilience of this integrated agroecosystem.