From Wikipedia we learn:
During the era of McCarthyism, Chaplin was accused of "un-American activities" as a suspected communist. J. Edgar Hoover, who had instructed the FBI to keep extensive secret files on him, tried to end his United States residency. FBI pressure on Chaplin grew after his 1942 campaign for a second European front in the war and reached a critical level in the late 1940s, when Congressional figures threatened to call him as a witness in hearings. This was never done, probably from fear of Chaplin's ability to lampoon the investigators. In February 2012 an MI5 file on Chaplin was opened to the public which revealed that the FBI had contacted the British secret service to provide them with information which would enable them to ban Chaplin from the US. In particular, it wanted MI5 to find out where Chaplin was born and pursue suggestions that his real name was Israel Thornstein. MI5 searched, but to no avail. A suggestion that he "may have been born in France" also came to nothing.
In 1952, Chaplin left the US for what was intended as a brief trip home to the United Kingdom for the London premiere of Limelight. Hoover learned of the trip and negotiated with the Immigration and Naturalization Service to revoke Chaplin's re-entry permit. Chaplin decided not to re-enter the United States, writing: "Since the end of the last world war, I have been the object of lies and propaganda by powerful reactionary groups who, by their influence and by the aid of America's yellow press, have created an unhealthy atmosphere in which liberal-minded individuals can be singled out and persecuted. Under these conditions I find it virtually impossible to continue my motion-picture work, and I have therefore given up my residence in the United States."