Don Knotts left The Andy Griffith Show as a regular cast member in 1965.
Knotts played Deputy Barney Fife, the nervous and overconfident lawman whose comic partnership with Sheriff Andy Taylor became the show’s central relationship. He was a regular for the first five seasons, earning five Emmy Awards for the role.
Knotts believed Andy Griffith had indicated that the series would end after five seasons, so he began pursuing film work and signed a five-picture agreement with Universal. When Griffith decided to continue the show, Knotts had already chosen to move on, and he left the regular cast in 1965.
The series explained Barney’s departure by sending him to Raleigh, North Carolina, where he joined the police force. Knotts did not disappear from the Mayberry universe entirely: he returned for five guest appearances during seasons six through eight, and later reprised Barney in the television film Return to Mayberry. That recurring return is why some viewers remember him as present after 1965, even though he was no longer a regular.