The surface modification of titanium by micro-arc oxidation under different voltages was processed to achieve good direct oseointegration. The new technique of two-dimensional X-ray diffraction was used to measure the residual stress of the layer. The results show that a porous titania layer containing Ca and P is obtained by micro-arc oxidation. The pore size and Ca/P of the layer are affected by the voltage. The high voltage can induce forming CaTiO3. The residual stress under different voltage is compressive stress and increases with the improvement of the voltage.