Peatlands of the central Congo Basin have accumulated carbon over millennia. They currently store some 29 billion tonnes of carbon in peat. However, our understanding of the controls on peat carbon accumulation and loss and the vulnerability of this stored carbon to climate change is in its infancy. Here we present a new model of tropical peatland development, DigiBog_Congo, that we use to simulate peat carbon accumulation and loss in a rain-fed interfluvial peatland that began forming ~20,000 calendar years Before Present (cal. yr BP, where 'present' is 1950 CE). Overall, the simulated age-depth curve is in good agreement with palaeoenvironmental reconstructions derived from a peat core at the same location as our model simulation. We find two key controls on long-term peat accumulation: water at the peat surface (surface wetness) and the very slow anoxic decay of recalcitrant material. Our main simulation shows that between the Late Glacial and early Holocene there were several multidecadal periods where net peat and carbon gain alternated with net loss. Later, a climatic dry phase beginning ~5200 cal. yr BP caused the peatland to become a long-term carbon source from ~3975 to 900 cal. yr BP. Peat as old as ~7000 cal. yr BP was decomposed before the peatland's surface became wetter again, suggesting that changes in rainfall alone were sufficient to cause a catastrophic loss of peat carbon lasting thousands of years. During this time, 6.4 m of the column of peat was lost, resulting in 57% of the simulated carbon stock being released. Our study provides an approach to understanding the future impact of climate change and potential land-use change on this vulnerable store of carbon.