Fault diagnosis is essential to ensure the reliability of the mechanical systems. However, the working conditions of mechanical systems are highly extreme and varying. This results in the significant domain shift between different domains. In this paper, a transfer learning method, named local domain adaptation network (LDANet) is proposed for fault classification. Firstly, a subdomain adaptation model is proposed to perform fault classification. Secondly, a local feature metric is adapted in LDANet to align the local features of two domains in the class level. Thirdly, a convolutional network-based generator is utilized to obtain common features and a fully connected layer-based generator is adopted to extract specific features. Finally, a gearbox fault diagnosis test is utilized to demonstrate the performance of LDANet. The comparison tests indicate that LDANet obtains the best fault diagnosis performance among other transfer learning methods.