In recent years, the relationship between consumers and brands has become key for companies or brands to establish a competitive advantage. Brand Relationship Quality (BRQ) has become a factor highly emphasised by marketing managers. Improving BRQ is a way for companies to cope with the intensely competitive market environment. Virtual brand communities (VBCs) are popular online communication platforms where consumers and brands can easily establish relationships. Therefore, how to enhance consumer-brand relationship quality within VBCs is an issue that requires attention from the companies. Thus, the focus of this study is to explore the factors influencing BRQ in Xiaomi mobile phone VBC, based on BRQ theory. The researchers selected four cities in China, representing the east, west, south and north of China, and conducted a survey among Xiaomi mobile phone users in these four cities. In total, 306 questionnaires were collected for data analysis. This study used the partial least squares structural equation model (PLS-SEM) method to establish a measurement model and test its validity, reliability, and correlation. The results showed that second-order constructed brand image and first-order construct brand attachment were closely related to BRQ, and confirmed the relationship between the three sub-dimensions of brand image (functional image, symbolic image and experiential image) and BRQ. Through Bootstrap regression analysis, the mediating role of brand hate between brand image and BRQ, as well as between brand attachment and BRQ, was confirmed. The study found that among the 15 significant relationship hypotheses proposed, only 3 significant relationship hypotheses were not supported. Specifically, the symbolic image showed no significant effect on BRQ, the functional image exhibited no significant effect on brand hate, and brand hate had no significant mediating effect between the functional image and BRQ. Therefore, BRQ in VBCs can be enhanced by improving brand image and brand attachment. In summary, this model provides a strong understanding of the factors influencing BRQ. Based on the findings, this study provides theoretical and practical contributions to academics and professionals, as well as guiding suggestions for marketing managers to develop future marketing strategies.