TiN and TiCN thin films are used as antiwear layer on parts such as metal cutting tools. It is reported that the thin films that are deposited ceramics and metals have preferred orientation, and that the residual stresses generate by the difference in the coefficients of thermal expansion between the thin films and the substrate. Tools coated with TiN and TiCN films are heated to high temperature during service due to the frictional heat. Under this condition, the texture and the residual stress should change due to the heat. In the material engineering, it is well known that the residual stress in the material affects the mechanical strength of the industrial products. The purpose of this study is to examine the effect of the residual stress on the mechanical strength of TiN and TiCN thin films having preferred orientation.In this study, specimens that are deposited TiN and TiCN respectively by Physical Vapor Deposition (PVD) were annealed in a furnace at temperature of 573K, 798K, 843K and 893K. Using X-ray diffraction technique, the crystallite orientation was evaluated by the pole figure and the crystallite orientation distribution function (ODF). The films exhibited {111} fiber texture. After that, the residual stress of thin films was measured using CoKα radiation with the two-exposure method at Ψ=39° and 75°. Since the relationship between the mechanical strength and the residual stress has not been revealed about the thin film materials, the effect of the residual stress on the mechanical strength of the TiN and TiCN thin films having preferred orientation was investigated by the dynamic hardness (DH) and the scratch test.As a result, although the ODF little changed due to the heat treatment, the residual compressive stress relaxed at higher temperatures than 573K. As for the hardness of thin films, the residual stress did not affect the hardness. However, the residual stress influenced the behavior of the scratch test. The abrasive wear and the micro cracks were decreased by highly residual compressive stress.