In recent years, intelligent fault diagnosis technology has rapidly advanced, achieving remarkable results. Most of them assume that the source and target domains have similar distributions. However, the actual working conditions of rotating machinery are variable, leading to a significant distribution discrepancy between the source and target domains. The majority of existing domain adaptation methods mainly consider either the marginal distribution or the conditional distribution between the source and target domains, which limits the improvement of diagnostic performance in the target domain. Considering the discrepancy in domain distributions, a deep conditional adversarial subdomain adaptation network (DCASAN) is proposed in this paper for unsupervised mechanical fault diagnosis under unknown working conditions. In DCASAN, a backbone network based on the feature fusion of convolutional neural network (CNN) and graph convolutional network (GCN) is designed for feature extraction. Furthermore, a conditional adversarial subdomain adaptation strategy is proposed, which simultaneously considers both the marginal distribution and the conditional distribution. Under the joint constraints of marginal and conditional distribution alignment, the extracted features exhibit improved inter-class discriminability and intra-class consistency, effectively reducing the distribution discrepancy between different domains. Results from multiple transfer tasks on three rotating machinery datasets demonstrate that the proposed method can learn rich transferable features. The overall average accuracy of the proposed method on these three datasets is 88.07%, 89.17%, and 96.63%, respectively, significantly outperforming other methods in terms of robustness and generalization.