Sabah forms the northern part of the island of Borneo, which is situated at the southwestern South China Sea (SCS) margin. The Cenozoic sedimentological record includes deposits related to the formation of the SCS and the demise of its predecessor, the Proto-South China Sea (PSCS). The Paleogene was characterised by deep marine turbidite sedimentation on the south side of the PSCS, which was subducted beneath the Cagayan Arc and North Sabah. The Early Miocene Sabah Orogeny eliminated the PSCS and several mélanges were formed. Zircons from the mélanges and turbidites indicate magmatism associated with the PSCS subduction continued until c. 19.6 Ma. Immature mineral assemblages and detrital zircon age spectra suggest a partly northern source. The collision deformed and exhumed the deep marine rocks, and is marked by the Top Crocker Unconformity (TCU). Post-TCU Neogene sedimentary rocks were deposited in fluvio-deltaic to shallow marine environments and are compositionally mature with a quartzose recycled orogenic source, and ultra-stable heavy mineral assemblages dominated by zircon, tourmaline and rutile (ZTR). The lower Neogene formations have substantial amounts of chrome spinel, while upper Neogene formations are almost devoid of chrome spinel and have higher contents of ZTR, suggesting two Neogene sedimentation cycles, both with sources in Sabah. Based on sandstone petrography, heavy mineral assemblages and detrital zircon ages, sediment sources for the first cycle included recycled Paleogene turbidites with input from uplifted peridotites, while the second cycle was mainly sourced from recycling of older Neogene fluvio-deltaic formations with input from Paleogene turbidites.