This study examines a moderated mediation model involving LGBTQ Christians' sense of community in both Christian and LGBTQ communities, faith generation, intrinsic religiosity, basic psychological needs, and depression, with participants recruited from Taiwan. It explores whether the relationship between community sense and depression is mediated by psychological needs and whether this effect is influenced by faith generation and intrinsic religiosity. Participants included 355 LGBTQ Christians from Taiwan, with an average age of 30.04 years. The largest subgroup identified as bisexual (28.2%). The study utilized several scales, including the Sense of Community Index, Hoge Intrinsic Religiosity Scale, Center for Epidemiologic Studies Depression Scale, and the Basic Psychological Needs Scale. Key findings include: (1) Belonging and competence needs fully mediated the link between Christian community sense and depression, while belonging needs partially mediated the link between LGBTQ community sense and depression. (2) For first-generation LGBTQ Christians, belonging needs fully mediated the relationship between Christian community sense and depression. For second-generation or beyond, autonomy and competence needs fully mediated the relationship between Christian community sense and depression, while belonging needs partially mediated the relationship between LGBTQ community sense and depression. (3) In individuals with high intrinsic religiosity, belonging needs fully mediated the link between Christian community sense and depression and partially mediated the relationship with LGBTQ community sense. The study concludes with recommendations for further research and practical suggestions for church communities, LGBTQ groups, and mental health professionals.