B, Ni, and CNTs co-doped diamond-like carbon (B, Ni, CNTs co-doped DLC) films were synthesized on the surface of AZ91D magnesium alloy by electrodeposition with low cost. The effect of CNTs concentration on the microstructure, microhardness, tribological properties and corrosion behavior of B, Ni, CNTs co-doped DLC films were evaluated. Results revealed that the B, Ni, CNTs co-doped DLC films were hydrogenated amorphous carbon films. Raman spectra showed that the D and G peaks of DLC films appear near 1330 cm−1 near 1580 cm−1, respectively. When the concentration of CNTs was 0.25 g/L, the CNTs were evenly distributed, making the structure of co-doped DLC films uniform, dense and flat. At this time, since the combined synergistic effect of reticulation of CNTs and the network-like structure of DLC films, the microhardness of the co-doped DLC films reached the maximum of 248.3 HV. The tubular structure of CNT supports and lubricates the substrate, which weakens the frictional resistance between the friction partners and reduces the friction coefficient to the lowest value of 0.128. The wear loss was the minimum with 0.1 × 10−5 kg/m, which is the result of CNTs exerting their self-lubricating properties to improve the wear resistance of the DLC film so that less wear occurs during the repeated friction process. Meanwhile, the positive corrosion potentials of B, Ni, CNTs co-doped DLC films indicate that the three elements co-doped DLC films can improve the corrosion resistance of magnesium alloy substrates.