A lighting device with a lighting function includes a coating layer coated onto the outer surface of a main body, and the coating layer is made of an antiviral material, so that the main body of the lighting device is coated with an antiviral material mainly composed of titanium dioxide and nanosilver to provide the self-cleaning and deodorizing effects, and the advantages of resisting viruses and bacteria, removing pollutants from the environment, and preventing mildews and algae effectively.