It’s been a while, but IIRC NY county DAs are appointed by county executives, and can be replaced by them. But I’m not sure all counties operate under the same regulations. I certainly remember there were different catergories of towns and the laws governing them.
In Monroe Country, the DA is elected to a four-year term. If you mean New York County, i.e. Manhattan, that position is also elected. I haven’t checked, but I bet they all are.
In New York State, impeachment is conducted by the state legislature, along with the State Court of Appeals justices. The early 20th century governor William Sulzer was impeached and removed.
But I’ve never heard of an impeachment of a District Attorney. Since the position is a county level official I’m not sure the state could act. The state constitution doesn’t spell out what offices are impeachable; it mentions the governor and lieutenant-governor specifically but it’s happened to other state-level offices.
I’ve never even heard talk about a possible D.A. impeachment and I’d think that would have come up if it were possible in these contentious partisan times.
Out of curiousity I’ll ask, what county would this be, hypothetically? I knew a lawyer who let me check the state laws in his books. They may be online now, and they weren’t that difficult to navigate.