In this paper, the nickel-phosphorus (Ni-P) diffusion barrier layer between Sn-4Ag-0.5Cu solder alloy and copper-printed circuit board was developed. The electroless plating technique was used to develop Ni-P diffusion barrier layer with different percentage of phosphorus content, which are 1-5 wt% (low), 5-8 wt% (medium) and above 8 wt% (high). The results reveal that the high phosphorus content in nickel layer acts as a good diffusion barrier for Sn-4Ag-0.5Cu since it can suppress the intermetallic compound formation. This is because in higher phosphorus content, the grain boundaries were found to be eliminated. Hence, resulted in thinner intermetallic compound thickness.