By means of field geological survey,indoor rock slice observation,hydrocarbon source rock geochemical analysis and carbon isotope test,the characteristics of carbonate source rocks of late Paleozoic-Mesozoic in the northern margin of Beibu Gulf in Guangxi were studied in this paper. The results show that the abundance of organic matter in carbonate is generally high in the northern margin of Beibu Gulf in Guangxi,and its TOC ranges from 0.29% to 1.93% with mean value of 0.73%,which is above the hydrocarbon generation threshold. The type of organic matter is mainly typeⅠand a few of type Ⅱ. The thermal evolution of organic matter is in high maturity-over mature stage with Ro values ranging from 1.35% to 4.78%. The abundance of organic matter is characterized by low values of hydrocarbon generating potential,chloroform bitumen“A”content and total hydrocarbon content. The δ13C value of chloroform bitumen“A”ranges from -30.24‰ to -23.44‰,varying from light to heavy and then to light with the decreasing of stratigraphic age. And the distribution of normal paraffins also changes from unimodal to bimodal and then to unimodal,which suggests that the evolution of depositional environment is from marine facies to transitional facies and then to lake facies. The biomarker parameters such as Pr/Ph ratio,sterane and terpane indicate that lower aquatic organisms mainly contribute to the organic matter with some terrestrial organic matter and they were deposited in reducing environment of brackish water.