Purpose Based on the perspectives of social capital, image motivation and motivation affordances, this paper explores the direct and moderation effects of different kinds of motivations (i.e. relationship-based motivation, community-based motivation and individual-based motivation) on users' continuous knowledge contributions in social question and answer (Q&A) communities.Design/methodology/approachThe authors collect the panel data of 10,193 users from a popular social Q&A community in China. Then, a negative binomial regression model is adopted to analyze the collected data.Findings The paper demonstrates that social learning, peer recognition and knowledge seeking positively affect users' continuous contribution behaviors. However, the results also show that social exposure has the opposite effect. In addition, self-presentation is found to moderate the influence of social factors on users' continuous use behaviors, while the moderation effect of motivation affordances has no significance.Originality/value First, this study develops a comprehensive motivation framework that helps gain deeper insights into the underlying mechanism of knowledge contribution in social Q&A communities. Second, this study conducts panel data analysis to capture the impacts of motivations over time, rather than intentions at a fixed time point. Third, the findings can help operators of social Q&A communities to optimize community norms and incentive mechanisms.