To provide a cosmetic composition and a hair wash which are excellent in metal pyrithione salt persistence after washing with a washing liquid containing a surfactant, etc. A cosmetic composition and a hair wash, which comprise a copolymer and a metal pyrithione salt, wherein the copolymer contains constituting units corresponding to a cationic vinyl monomer of a specific structure and constituting units corresponding to a nonionic vinyl monomer of a specific structure.