Darwin had his basic theory of natural selection "by which to work" by December 1838, yet almost twenty years later, when Wallace's letter arrived on 18 June 1858, Darwin was still not ready to publish his theory. It was long thought that Darwin avoided or delayed making his ideas public for personal reasons. Reasons suggested have included fear of religious persecution or social disgrace if his views were revealed, and concern about upsetting his clergymen naturalist friends or his pious wife Emma. Charles Darwin's illness caused repeated delays. His paper on Glen Roy had proved embarrassingly wrong, and he may have wanted to be sure he was correct. David Quammen has suggested all these factors may have contributed, and notes Darwin's large output of books and busy family life during that time.
Why might Darwin have postponed publishing his theory of evolution for over 20 years?
fear of religious persecution or social disgrace