The electronic structure parameters of pure Ti and TiPt alloy, such as density of states, Fermi energy level, environment-sensitive embedding energy and order energy have been calculated by recursion method. The environment-sensitive embedding energy induced by Pt in Ti crystal is greater than that on Ti surface, so Pt is prone to gather on Ti surface. The order energy between Pt atoms is positive, which leads Pt atoms to form intermetallics with bulk Ti atoms. The electric potential of intermetallics is lower than that of Ti atom cluster at Ti alloy surface, so cells will form between intermetallics and Ti atom clusters, then the intermetallic will decompose in corrosive medium. With the deposition of Pt, a rough electrocatalytic Pt layer would form on the surface of Ti alloy. This electrocatalytic Pt layer enhances the passivation of Ti alloy and improves the corrosion resistance of Ti alloy.