Peace of mind is an important affective well-being valued in Chinese culture. Mindfulness and self-compassion could potentially promote peace of mind. However, the mechanisms underlying these effects were not well understood. The current cross-sectional study aimed to investigate whether nonattachment explained the effects of mindfulness and self-compassion on peace of mind. A sample of 364 Chinese adults was recruited from WeChat, a popular Chinese social media platform. Participants filled out an online survey including measures of dispositional mindfulness, self-compassion, nonattachment, and peace of mind. The results of correlation analyses revealed significant and positive associations among mindfulness, self-compassion, nonattachment, and peace of mind. Furthermore, nonattachment significantly mediated the associations between mindfulness and self-compassion with peace of mind. Moderated mediation analyses indicated that the relationships between mindfulness and self-compassion with nonattachment were stronger for women than for men. Gender did not moderate the direct effects of mindfulness and self-compassion on peace of mind, the relationship between nonattachment and peace of mind, and the mediating effects of mindfulness and self-compassion on peace of mind through nonattachment. These findings suggest that nonattachment may be a potential mechanism through which mindfulness and self-compassion promote peace of mind among Chinese adults. If the mediating effects are confirmed in future longitudinal and experimental studies, mindfulness and self-compassion interventions can emphasize nonattachment to optimize their effects on peace of mind. It may also be important to tailor mindfulness and self-compassion training for men and women given the gender differences in the relationships between mindfulness and self-compassion with nonattachment.