A subsidiary of Citigroup Inc. has agreed to pay a $1 million penalty to New York state to resolve a four-year investigation in which it acknowledged overcharging customers some $22.5 million in fees.

An investigation by state Attorney General Eric Schneiderman’s office, which began after a customer complaint in 2012, led Citigroup Global Markets Inc. in October 2014 to begin reimbursing customers in full for fees it had overcharged them, plus interest.