Social capital theory has been used widely to explain knowledge contribution. However, most of the previous studies have focused on investigating the direct impact of social capital, while the underlying mechanism by which social capital affects knowledge contribution has not been fully understood. It has been argued that social capital facilitates knowledge exchange by affecting the conditions necessary for exchange, not the exchange behavior itself. We developed a research model in which anticipated status enhancement and community identification were identified as two mediators between social capital and the willingness to contribute knowledge. PLS analyses based on data collected from 448 online community members show that the two mediators affect knowledge contribution positively. Except shared language, all other social capital factors, namely, instrumental network ties, expressive network ties, community trustworthiness, and norms of cooperation have significant positive effects on the mediators and their indirect effects on knowledge contribution are also significant.