A method of fabricating a semiconductor device is disclosed. The method includes forming a dielectric layer over a substrate, forming a trench in the dielectric layer, forming a first barrier layer in the trench. The first barrier layer has a first portion disposed along sidewalls of the trench and a second portion disposed over a bottom of the trench. The method also includes applying an anisotropic plasma treatment to convert the second portion of the first barrier layer into a second barrier layer, removing the second barrier layer while the first portion of the first barrier layer is disposed along sidewalls of the trench. The method also includes forming a conductive feature in the trench.