Cunningham, 51, headed Cary's police force from late 2005 until he resigned last December. He previously spent 24 years with the Tampa Police Department in Florida.
He will take charge in Winston-Salem on June 30, when Chief Patricia Norris retires. His salary will be $122,000 annually.
“(Cunningham) will provide leadership that aggressively combats crime and improves police visibility in our neighborhoods. He is also committed to continuing the outstanding work of Chief Norris in strengthening the relationships of the department with the community,” Winston-Salem City Manager Lee Garrity said in a statement.