The invention provides a metal surface treatment agent composed of aqueous solution or aqueous emulsion containing ionic liquid. The metal surface treatment agent comprises the ionic liquid, silicate or silane coupling agent, water-soluble chitin or chitosan, corrosion inhibitor, stabilizer, pH modifier, wetter, coalescing agent, antioxidant, ethanol and water, the ionic liquid is room-temperature ionic liquid consisting of nitrogenous heterocyclic compound cations and inorganic or organic anions, one or more of nanoscale titanium dioxide, zirconium oxide or zirconium fluoride is uniformly mixed into the silicate or silane coupling agent by the weight equivalently accounting for 3%-25% of that of the silicate or silane coupling agent. A chemical conversion coating is formed on a metal surface by the metal surface treatment agent, can inhibit corrosion of the metal surface, and has a fine coating performance. The metal surface treatment agent is used for treating cold-rolled plates, galvanized plates and aluminum plates, and the metal surface treated by the metal surface treatment agent has the coating adhesion force equivalent to that of a metal surface treated by a phosphorus-containing metal surface treatment agent.