The invention relates to a method for coloring the titanium and titanium alloy surface through anodization. The invention aims to provide a novel fluoride-free and environmental-friendly technology to improve the present titanium and titanium alloy anodization technology generally employing the highly toxic substance hydrofluoric acid, so that the requirements for green and safe production and sustainable development can be met. The method comprises the following processes: acceptance inspection before anodization, hanging, oil removing, flowing hot water washing, flowing cold water washing, electrolytic polishing, flowing cold water washing, deionized water washing, anodization, flowing cold water washing, flowing hot deionized water washing, dismounting, drying and inspection. The anodization coloring technology of the invention has low cost, simple operation, and can generate colorful and bright-colored high quality oxide-film layers, characterized by fingerprint pollution prevention on the surface, strong stain resistance and excellent decorative effect.