The influence of the chemical composition of the substrate material on the chemical and phase composition of the formed coating was investigated. A number of experiments aimed at studying the interaction of titanium alloys with ultrashort laser pulses in different reaction media was carried out. A new method for the formation of titanium carbide under the action of ultrashort laser pulses on the surface of a titanium sample in a liquid hydrocarbon and liquid nitrogen medium is described. The description of the experiment is presented. The treated surface was investigated using a scanning electron microscope. Raman spectra from the surface of treated titanium alloys under different exposure conditions are obtained.