text: Well, traveling in the Beagle ship was one for sure. Before that he was already an evolutionist (closer to Lamark) but he figured out natural selection only after comparing varieties of the same species on nearby islands and finding out some islands had species that where absent in others close by. Until then he had worked mostly with domestic animals and breeders. Reading Malthus' essay on population also helped.\nThe second I would say was finding out that someone else (I don't recall the name just now) was working in the same line as he was, that is, on the idea of natural selection. Only then did he sit down and write On the Origin of Species, long after his return from sea.