In an introduction, Orwell writes
". . . for the past ten years I have been convinced that the destruction of the Soviet myth was essential if we wanted a revival of the socialist movement. On my return from Spain [Orwell fought against the Fascists] I thought of exposing the Soviet myth in a story that could be easily understood by almost anyone . . . However, the actual details of the story did not come to me for some time until one day (I was then living in a small village) I saw a little boy, perhaps ten years old, driving a huge carthorse along a narrow path, whipping it whenever it tried to turn. It struck me that if only such animals became aware of their strength we should have no power over them, and that men exploit animals in much the same way as the rich exploit the proletariat."
I proceeded to analyse Marx's theory from the animals' point of view.
According to Wikipedia's List of books banned by governments: "Author’s preface suppressed in nearly all editions. In the 1940s, Allied forces found the book critical of the USSR, and therefore the material was too controversial to print during wartime; publishers were reticent to print the work, and copies were suppressed. A play of Animal Farm was banned in Kenya in 1991, because it criticizes corrupt leaders. In 2002, the novel was banned in the schools of the United Arab Emirates, because it contained text or images that goes against Islamic and Arab values."
Learn more about the context in which the book was written in Christopher Hitchens' review for the Guardian.