The invention discloses a preparation method of a titanium dioxide nano composite material, and belongs to the technical field of nano medical materials. The invention provides a medical composite material with wide antiviral activity, antibacterial activity and anticancer activity, and provides the preparation method of the titanium dioxide nano composite material. According to the invention, titanium dioxide is used as an inorganic semiconductor nano material as a carrier, encapsulation of organic photosensitive molecules is carried out, and biocompatible macromolecules are used for surfacemodification. The prepared material has wide antiviral activity, antibacterial activity and anticancer activity, and the biological activity of the material destroys viruses, bacteria and nucleic acids, proteins, lysosomes and mitochondria of bacterial and infected cells based on active oxygen generated by photocatalysis, so that the viruses, bacteria and cancer cells cannot be copied, and tissuenutrients cannot be supplied, thereby killing the viruses, bacteria and cancer cells. The nano composite material provided by the invention can also be used as a protective material for medical treatment and public health, including medical masks, protective clothing, gloves, disinfectants and the like.