In this article, we calculate the mass modifications of the vector and axialvector mesons D * , B * , D1 and B1 in the nuclear matter with the QCD sum rules, and obtain the massshifts δMD * = −71 MeV, δMB * = −380 MeV, δMD 1 = 72 MeV, δMB 1 = 264 MeV, and the scattering lengths aD * = −1.07 fm, aB * = −7.17 fm, aD 1 = 1.15 fm and aB 1 = 5.03 fm for the D * N , B * N , D1N and B1N interactions, respectively.