The events that precede the new philosophy include: Napoleon executing animals who dare to question his authority. Animals are torn to pieces by his attack dogs right in front of the other animals so that they will be afraid of him and not question anything he does or says.
Four legs good, two legs bad comes from the speech made by Old Major in the beginning of the book that is one of the principles of the theory of animalism that is at the heart of the rebellion. Old Major is instructing the animals to never trust anything that walks on two legs, he, of course, is referring to man, who he says is evil. Old Major would be very surprised that by the end of the book, pigs are walking on two legs and have taken on all the traits of man in direct opposition to his philosophy.
The conclusion of the novel depicts how the rebellion worked to get rid of the farmer, but did not succeed in equality for all animals. Instead of sharing equality, the animals are now under the rule of a harsh tyrant, Napoleon, who is cruel and violent in ways that Farmer Jones never was. In fact, he is so severe in his treatment of the animals that the phrase, all animals are equal, but some are more equal than others, applies to the new rules that govern the farm.
"In chapter one, Old Major interrupts his speech appealing to the animals for a Rebellion against the humans by asking for a vote on whether "wild creatures, such as rats and rabbits" should be included in the statement "All animals are comrades." Although at this point, the animals vote to accept the rats, later distinctions between different types of animals become so commonplace that the seventh commandment of Animalism is officially changed to read, "All animals are equal, but some are more equal than others."
Napoleon and the pigs are the ruling class, they and their cronies and associates live well, while the animals, the horses, sheep, etc, work and work and work, are fed very little and are carted off to the slaughterhouse once they can no longer work hard.