The biggest challenge in fostering a virtual community is the supply of knowledge, namely the willingness to share knowledge with other members. This paper integrates the Social Cognitive Theory and the Social Capital Theory to construct a model for investigating the motivations behind people's knowledge sharing in virtual communities. The study holds that the facets of social capital - social interaction ties, trust, norm of reciprocity, identification, shared vision and shared language - will influence individuals' knowledge sharing in virtual communities. We also argue that outcome expectations - community-related outcome expectations and personal outcome expectations - can engender knowledge sharing in virtual communities. Data collected from 310 members of one professional virtual community provide support for the proposed model. The results help in identifying the motivation underlying individuals' knowledge sharing behavior in professional virtual communities. The implications for theory and practice and future research directions are discussed.