Climate change is projected to have severe implications for smallholder agriculture in Africa, with increased temperatures, increased drought and flooding occurrence, and increased rainfall variability. Given these projections, there is a need to identify effective strategies to help rural communities adapt to climatic risks. Yet, relatively little research has examined the politics and social dynamics around knowledge and sources of information about climate-change adaptation with smallholder farming communities. This paper uses a political ecology approach to historically situate rural people's experiences with a changing climate. Using the concept of the co-production of knowledge, we examine how Malawian smallholder farmers learn, perceive, share and apply knowledge about a changing climate, and what sources they draw on for agroecological methods in this context. As well, we pay particular attention to agricultural knowledge flows within and between households. We ask two main questions: Whose knowledge counts in relation to climate-change adaptation? What are the political, social and environmental implications of these knowledge dynamics? We draw upon a long-term action research project on climate-change adaptation that involved focus groups, interviews, observations, surveys, and participatory agroecology experiments with 425 farmers. Our findings are consistent with other studies, which found that agricultural knowledge sources were shaped by gender and other social inequalities, with women more reliant on informal networks than men. Farmers initially ranked extension services as important sources of knowledge about farming and climate change. After farmers carried out participatory agroecological research, they ranked their own observation and informal farmer networks as more important sources of knowledge. Contradictory ideas about climate-change adaptation, linked to various positions of power, gaps of knowledge and social inequalities make it challenging for farmers to know how to act despite observing changes in rainfall. Participatory agroecological approaches influenced adaptation strategies used by smallholder farmers in Malawi, but most still maintained the dominant narrative about climate-change causes, which focused on local deforestation by rural communities. Smallholder farmers in Malawi are responsible for <1% of global greenhouse gas emissions, yet our results show that the farmers often blame their own rural communities for changes in deforestation and rainfall patterns. Researchers need to consider differences knowledge and power between scientists and farmers and the contradictory narratives at work in communities to foster long-term change.