The rapid growth of network access and the development of Web 2.0 have resulted in the popularity of virtual communities (VCs), such as Wikipedia, Facebook, professional forums and social network communities. The impact of VCs increasingly spreads over a broad range of fields, from social and educational to business. The content (i.e., knowledge) that VC members provide is the factor that determines the growth and survival of VCs. Previous studies have investigated the factors that influence knowledge-sharing behavior in the VC environment. Despite the fact that these studies have examined the same factors, their findings have been inconsistent. In this paper, we argue that group identity mediates the relationships between knowledge sharing and these factors. This study adopts social identity theory as a theoretical foundation and collects data from a popular virtual community in Taiwan. The results show that group identity indeed mediates the relationships between VC member knowledge sharing and both organizational commitment and organizational support.