During the final glaciation and following melting across the Carboniferous/Permian boundary, southern Gondwana experienced an icehouse to greenhouse transition at a relatively high palaeolatitude (ca. 60°). Sediments deposited from around 300 to 280 Ma in the southern Karoo Basin are archives of this transition, but the evolution of their links to the flanking oceans is still a matter of debate. The aim here is to detail the deglaciation history by simulating early diagenetic processes both under melt and marine water conditions. For this, black shale core samples from three wells, which were drilled in the 1960s through the Lower Ecca Group into the Dwyka Group, were analysed for TOC contents, mineralogical composition and textural properties. The data allow extrapolations about the depositional mineralogy and early diagenesis that in turn serve as input parameters for hydrogeochemical models. The imaging and modelling results reveal that the organic carbon-lean shales associated with, and directly overlying the diamictite beds of the Dwyka Group (known as the Prince Albert Formation) can be interpreted as rhythmites (varves?) deposited under freshwater conditions in response to the deglaciation across southern Gondwana during the latest Carboniferous (~300 to 280 Ma). Thereafter, in the early Permian (~280 Ma) the first notable marine influence is revealed by the occurrence of Mg-bearing carbonate precipitates in black shales of the Whitehill Formation of the overlying Lower Ecca Group; and from the hydrogeochemical models. Preferential preservation of organic matter in these shales is interpreted to be due to marine water fluctuations from the south that created stratified water columns of dense anoxic cold bottom systems overlain by lighter freshwater. Directly above the Whitehill Formation, Mn-siderite in rhythmites of the Collingham Formation points to a recurring influx of fresh water from the north. Today, the black shales of the Lower Ecca Group are tight, and thermogenic gas accumulated in inter-particle pores, in intra-particle pores in albite, organic matter and dolomite, or adsorbed on organic matter in the Whitehill Formation. The brittleness of this prospective Whitehill Formation is weakened in places by high contents of chlorite and illite, but to a lesser degree elsewhere due to low contents of carbonate and quartz cements.