Provided is a method for plating a biocompatible coating with nano structure on the surface of a nickel-titanium shape memory alloy, particularly a method suitable for plating a coating on the surface of medical devices made of nickel-titanium alloy. The method includes the following steps: heat treating, surface pretreating, ion sputter cleaning, depositing a pseudodiffusion layer, plating a sub-layer film, plating a pure TiN layer, and so on. The coating has the following advantages: 1) it could deform in response to the deformation of substrate without delaminating and cracking; 2) it has less resistance to the deformation of substrate; 3) it has less penetrable holes so as to reduce the dissolution of nickel into bio-body through these holes; 4) the coating has better biocompatibility compared to the substrate material.