(1) Aims: This paper aims to analyze the factors affecting children’s mental health during home quarantine from the perspective of family composition in a specific Chinese context where historically, families are small in size. (2) Methods: Here, 10,210 online questionnaires from 3 junior high schools in Xi’an and Hanzhong from 23 to 27 February 2020, were collected to explore the impact of family factors on children’s mental health in Northwest China during home quarantine based on the ecosystem theory, by using OLS, logit regression models, and the Shapley value decomposition method. (3) Results: The mental health of northwestern Chinese children changed significantly after home quarantine. We also found that during home quarantine, some factors, such as a high-income family, lack of siblings, living with parents, mothers with middle- or high-level occupations, frequent parent–child communication, and better parent–child relationships, were positively related to children’s mental health. (4) Conclusions: Different from previous studies, this paper found that the psychological condition of children in Northwest China tended to be improved during the epidemic. In addition, family factors, especially the parent–child interaction, played an important role in the mental health of children during the epidemic.