As a community of practice (CoP) is known to facilitate team learning, it is increasingly important to understand the mechanisms of CoP, thereby enabling organizations to fully utilize it and optimize its benefits. To explain how CoP improves organizational performance, we focus on its effects on social capital and knowledge management activities, and propose a research model suggesting that shared goals and trust in CoP improve its performance through knowledge integration. Our analysis uses structural equation modeling, with field data collected from 372 members of 46 CoPs in three companies; the analysis validates our research model. Our findings also suggest that CoP diversity can strengthen the link between knowledge integration and CoP performance.