The first book to be wirtten by Charles Darwin was The Zoology of the Voyage of H.M.S. Beagle written between 1838 and 1843 during hos voyages aboard the H.M.S. Beagle and witrh the first part titled Fossil Mammalia published in 1839 and the subsequent parts then published post 1840s.
This is considered the first book as it predates the famous text " On the Origin of Species by Means of Natural Selection, or the Preservation of Favoured Races in the Struggle for Life." The findings he reveals through this first offical book would then lead to the writting and then publishing of the aforementioned book.