To explore potential applications of tantalum and tantalum nitrides ͑TaN͒ as diffusion barrier materials in integrated circuits with Cu interconnects, we carry out detailed first-principles simulations of Cu/Ta and Cu/TaN systems. Various interfacial structures between Cu-and Ta-based compounds are examined by considering different surface orientations, in-plane arrangements, surface terminations, and chemical compositions. The coexistence of strong Cu-N ionic bonding and Ta-Cu covalent/metallic bonding dictates the stable interfacial structures. Using nudged elastic band method, we calculate the diffusion energy barriers of Cu to the pre-existing vacancies across Cu/Ta, Cu/TaN interfaces, and in bulk TaN compounds. As a comparison, Cu diffusion in Si is also studied. It was found that Cu can easily diffuse into Si either spontaneously or with small energy barriers. On the other hand, although the Cu/Ta interfacial diffusion barrier is low, the high vacancy formation energy in Ta renders Cu diffusion difficult. We find that fcc TaN is an excellent candidate for diffusion barrier material owing to its extremely high interfacial diffusion energy barrier. The bulk diffusion barrier of Cu in fcc TaN is also very high.