PurposeThe purpose of this research is to explore the effect of goal type of user-generated content (UGC) on consumers' intention of within-domain and across-domain compensatory consumption in closed social media platforms, the mediating effect of self-threat, self-enhancement and self-protection motivation and the moderating effect of self-efficacy.Design/methodology/approachFour between-subject experiments were conducted to verify the hypotheses presented in this research. Study 1a had a sample size of 60 respondents and examined the effect of goal type of UGC on compensatory consumption. Study1b replicated the effect by using a sample size of 60 respondents. Study 2 had a sample size of 70 respondents and verified the mediating role of self-threat, self-enhancement motivation and self-protection motivation. Study 3 examined self-efficacy as a critical moderator by using a sample of 255 participants.FindingsStudy 1a and Study 1b demonstrate that UGC with an attainment goal (vs maintenance goal) is more easily produced within-domain and across-domain compensatory consumption. Study 2 verifies that the effect of goal type of UGC on within-domain compensatory consumption is serially mediated by self-threat and self-enhancement motivation, and the effect of goal type of UGC on across-domain compensatory consumption is serially mediated by self-threat and self-protection motivation. Study 3 demonstrates that self-efficacy not only moderates the effects of self-threat on within-domain or across-domain compensatory consumption respectively, but also moderates the whole mediating path structure.Originality/valueThis research extends the understanding of UGC and addresses the inconclusive evidence of the impact of goal type of UGC on consumer compensatory behavior in the context of closed social media platforms. The authors identify the moderating role of self-efficacy, which explains why consumers adopt different compensatory strategies.