The Darwin Correspondence Project is jointly run by Cambridge University Library and Harvard University.
The newly-established Evolution Education Trust is one of a group of donors and has given £2.5m.
Project director Dr Jim Secord said: "We are deeply grateful for this visionary support."
The other donors are The Andrew W. Mellon Foundation, the Alfred P. Sloan Foundation, and the Isaac Newton Trust.
"The greatest threat to long running projects in the arts and humanities is that it's almost impossible to secure long-term funds," said Dr Secord.
"And so much project time is taken up in applying for, and managing, short-term grants.
"Now we can concentrate on finishing the job."
More than 15,000 letters have been identified since the project was founded in 1974 by the American scholar Frederick Burkhardt.
The letters are scattered across at least 200 institutions and private collections.
They take in every part of Charles Darwin's life from his school days onwards, and provide an intimate insight into his scientific development as well as his personal life.
"Darwin's conclusions about how all living things have evolved and are interconnected are among the most important ever made," said Dr Secord.
"Unlike his published works, Darwin's letters are vitally important in showing how science is done, with the constant gathering of new data, and the testing and questioning of theories and ideas."
So far 8,000 letters have been published, taking Darwin's correspondence up until 1870. More than 6,000 of them can be searched online for free at the Darwin Correspondence Project.
By the time the project is finished in 2022, 30 volumes of the letters will have been published.
A project to publish every letter ever written or received by Charles Darwin is expected to be completed after a £5m funding boost.