This study investigates the motivational factors affecting the quantity and quality of voluntary knowledge contribution in online Q&A communities. Although previous studies focus on knowledge contribution quantity, this study regards quantity and quality as two important, yet distinct, aspects of knowledge contribution. Drawing on self-determination theory, this study proposes that five motivational factors, categorized along the extrinsic-intrinsic spectrum of motivation, have differential effects on knowledge contribution quantity versus quality in the context of online Q&A communities. An online survey with 367 participants was conducted in a leading online Q&A community to test the research model. Results show that rewards in the reputation system, learning, knowledge self-efficacy, and enjoy helping stand out as important motivations. Furthermore, rewards in the reputation system, as a manifestation of the external regulation, is more effective in facilitating the knowledge contribution quantity than quality. Knowledge self-efficacy, as a manifestation of intrinsic motivation, is more strongly related to knowledge contribution quality, whereas the other intrinsic motivation, enjoy helping, is more strongly associated with knowledge contribution quantity. Both theoretical and practical implications are discussed.