PurposeThis study examines whether relational capital influences self-disclosure behavior through the mechanism of needs-based motivation in virtual communities.Design/methodology/approachThis study adopts hierarchical linear model (HLM) to differentiate between the relationships at different levels, with 378 online questionnaires recovered from 42 virtual communities.FindingsThe results show that group-level relational capital is positively related to self-disclosure and affects it through the partially mediating mechanism of motivation. Relational capital also strengthens the positive influence of the need to be on trend on individual self-disclosure behavior.Originality/valueThis study makes four research contributions. Firstly, we identify the means by which relational capital established within a virtual community influences user disclosure behavior. This focus differs from those of previous studies, which have emphasized privacy and security of information systems, cost–benefit considerations, and/or adopted personality traits as the research basis. Secondly, this study examines and verifies the mediating mechanism of motivation, establishing an alternative perspective for theoretical studies, and providing future studies with a reference for investigating the self-disclosure behavior of members. Thirdly, this research introduces and verifies the moderating effects of relational capital based on member relationships, thus making further theoretical and empirical contributions. Finally, we adopt HLM to conduct our analyses, thereby ensuring higher precision regarding the explanatory power of group-level explanatory variables for individual-level dependent variables.