Nitrogen-doped titanium oxide (TiO2-xNx) films were prepared by an improved ultrasonic spray pyrolysis device with buty1 titanate as the titanium source and ammonia as the nitrogen source. X-ray diffraction technique, scanning electronic microscope and UV-VIS spectroscopy were applied to study the microstructure, surface morphology and optical properties of the resulting films. The XRD peak intensity of the as-prepared films decreased with the increasing of nitrogen content and increased with the increasing of temperature, which indicates that the N doping introduced defects or strain in the TiO2 film. The SEM results indicate that all the samples have a nano-sized uniform surface. The smallest band gap and best hydrophobicity are obtained at the nitrogen concentration of 4 at. % and deposited at 400°C. The blood compatibility of TiO2-xNx thin films was observed through platelet adhesion. The experiments results show that the amount of thrombus on the TiO2-xNx thin films is much less than that of pyrolytic carbon. The experimental results show that the nano-sized TiO2-xNx thin films will be a new kind of promising materials applied to artificial heart valve and endovascula stent.