Lionel J. "Chicago" Anderson, 45, of Oak Street, Batavia, is charged with two counts of criminal sale of a controlled substance and two counts of criminal possession of a controlled substance.
Anderson is accused of selling crack cocaine on two occasions in August to an agent of the Local Drug Task Force.
Anderson was arrested at his residence last week.
He was jailed without bail and held for further court proceedings.
Anderson's arrest comes as part of an investigation into the transportation, sale and possession of crack cocaine in and around the City of Batavia.
State Police, Batavia PD, and the District Attorney's Office assisted in the investigation.