A charging member, comprising: a support; and a surface layer on the support, wherein the surface layer contains a compound represented by the following formula (a): in the formula (a): L1 represents a polymetalloxane having a structural unit represented by M1O n/2; n represents an integer of 1 or more and p or less when a valence of a metal atom M1 is p; M1 represents at least one metal atom selected from the group consisting of Ti, Zr, Hf, V, Nb, Ta, W, Al, Ga, In, and Ge; X1 represents any one of structures represented by the following formulae to; Y1 represents a group having a site that coordinates to M1 in L1; and (i) when X1 represents a structure represented by the formula, A1 represents an atomic group needed for forming a four- to eight-membered ring together with M1, X1, and Y1, the atomic group containing an aromatic ring, and one constituent carbon atom of the aromatic ring is bonded to an oxygen atom of X1, and (ii) when X1 represents a structure represented by any one of the formulae to, A1 represents a bond or atomic group needed for forming a four- to eight-membered ring together with M1, X1, and Y1: *-O-** *-S-** *-CO-O-** in the formulae to, * represents a bonding site with A1 and ** represents a bonding site with M1 in L1. a support; and a surface layer on the support, wherein the surface layer contains a compound represented by the following formula (a): in the formula (a): L1 represents a polymetalloxane having a structural unit represented by M1O n/2; n represents an integer of 1 or more and p or less when a valence of a metal atom M1 is p; M1 represents at least one metal atom selected from the group consisting of Ti, Zr, Hf, V, Nb, Ta, W, Al, Ga, In, and Ge; X1 represents any one of structures represented by the following formulae to; Y1 represents a group having a site that coordinates to M1 in L1; and (i) when X1 represents a structure represented by the formula, A1 represents an atomic group needed for forming a four- to eight-membered ring together with M1, X1, and Y1, the atomic group containing an aromatic ring, and one constituent carbon atom of the aromatic ring is bonded to an oxygen atom of X1, and (ii) when X1 represents a structure represented by any one of the formulae to, A1 represents a bond or atomic group needed for forming a four- to eight-membered ring together with M1, X1, and Y1: *-O-** *-S-** *-CO-O-** in the formulae to, * represents a bonding site with A1 and ** represents a bonding site with M1 in L1. L1 represents a polymetalloxane having a structural unit represented by M1O n/2; n represents an integer of 1 or more and p or less when a valence of a metal atom M1 is p; M1 represents at least one metal atom selected from the group consisting of Ti, Zr, Hf, V, Nb, Ta, W, Al, Ga, In, and Ge; X1 represents any one of structures represented by the following formulae to; Y1 represents a group having a site that coordinates to M1 in L1; and (i) when X1 represents a structure represented by the formula, A1 represents an atomic group needed for forming a four- to eight-membered ring together with M1, X1, and Y1, the atomic group containing an aromatic ring, and one constituent carbon atom of the aromatic ring is bonded to an oxygen atom of X1, and (ii) when X1 represents a structure represented by any one of the formulae to, A1 represents a bond or atomic group needed for forming a four- to eight-membered ring together with M1, X1, and Y1: *-O-** *-S-** *-CO-O-** in the formulae to, * represents a bonding site with A1 and ** represents a bonding site with M1 in L1. (i) when X1 represents a structure represented by the formula, A1 represents an atomic group needed for forming a four- to eight-membered ring together with M1, X1, and Y1, the atomic group containing an aromatic ring, and one constituent carbon atom of the aromatic ring is bonded to an oxygen atom of X1, and (ii) when X1 represents a structure represented by any one of the formulae to, A1 represents a bond or atomic group needed for forming a four- to eight-membered ring together with M1, X1, and Y1: *-O-** *-S-** *-CO-O-**