BackgroundBased on the family system theory, there is an interactive relationship in the family, especially the cognitive style and emotional changes of the husband and wife will affect the behavior, cognition and emotion of the partner. Data about the effects of marital relationships on mental health are often paired. Scholars study the effect of individual independent variables on the dependent variables and the effect of spouse independent variables on the dependent variables to explore the actor and partner effect in marital relationships.MethodsThis study used the China Family Panel Studies (CFPS) 2018 dataset to collect paired data on the marital satisfaction and self-rated mental health of 9,560 couples. The Actor–Partner Interdependence Moderation Model (APIMoM) was used to analyze whether moderator variables affect the direction and strength of the effect of marital satisfaction on self-rated depression. In the robustness test part, the robustness of the APIMoM model was tested by reanalyzing the independent variables using two kinds of  binary codes respectively, and the results showed that the models were robust.ResultsIndividuals’ marital satisfaction was significantly negatively correlated with their own depression level and with that of their spouse. The number of family members had a positive moderating effect on the results of the wife’s partner effect. Couples who lived in the environment with more family members had lower depression scores. Couples who have more children have higher depression scores. The number of children has a negative moderating effect on the results of partner effect of husbands and wives. The wife’s neurotic personality score has a negative moderating effect on the wife’s actor effect.ConclusionsIn terms of measures to prevent depression, women’s mental health should be given more priority than men’s. Living in a larger family with more children is beneficial for couples’ mental health. Efforts to prevent depression in couples should take into account the neurotic character of the members, especially the wife, and design special treatment and preventive measures accordingly. These findings highlight that binary dynamics should be considered in exploring what factors influence the mental health of married couples.