There is a growing interest among farmers and consumers in increasing production and consumption of grain legumes in Sweden. This requires better knowledge among farmers and advisors about suitable species, varieties and management practices for different conditions. Since cultivar suitability and management practices are highly site-specific, farmers need to gain their own experience of new crops and practices. This paper describes a farmer–researcher collaboration in which cultivation of grain legumes for food was investigated in on-farm experiments designed, managed and evaluated jointly by a group of farmers and researchers. Farmers tested innovative practices using within-field species diversity, comparative performance of varieties and methods for weed control. Post-harvest steps such as cleaning and selling the crops were considered by farmers to be integral components of the experiments. The process generated different types of knowledge, including practical knowledge on crop management, strategic knowledge on economic sustainability and knowledge about joint learning through collaboration. The on-farm experiments combined advantages of ‘pure’ farmer experiments (i.e., context specificity) and ‘pure’ researcher experiments (i.e., scientific inquiry), facilitating deeper analysis and understanding of outcomes. This enabled efficient knowledge building, adoption of new crops and innovative practices and stimulated further experimentation. The outcomes of this study are that farmer–researcher collaborations using on-farm experiments can stimulate collective learning by stimulating the exchange between participants and combining complementary perspectives throughout the experimentation process. The study also provides recommendations for facilitating on-farm experiments in future work, for instance using collective settings to evaluate the results.