Rare earth elements are an important indicator for studying the formation condition and environmental characteristics of sedimentary rocks. The REEs of limestone samples in the Zhaidi underground river in Guilin were determined by Laser Ablation-Inductively Coupled Plasma-Mass Spectrometry (LA-ICP-MS) and the formation environment is discussed in this paper. Results show that the total rare earth elements (REEs) content of carbonate rocks is low. There are differences in the concentrations of rare earth elements for carbonate rocks of different strata. Total REEs (ΣREEs) of sandstone in Xindu formation is the highest, followed by thick limestone of Rongxian formation (D3
r) and limestone of Guilin formation (D3
g). Thick-layer limestone of Dongcun formation (D3
d) and limestone and dolomite limestone of Etoucun formation (D3
e) contain low REEs. In general, heavy rare earth elements are relatively enriched, with negative Ce anomalies and no Eu anomalies. The REE patterns of carbonate rocks are completely different from negative Eu anomalies and no Eu anomalies for clastic rock. These characteristics of rare earth elements indicate that the sedimentary environment is an oxidative marine carbonate sedimentary environment, which provides a baseline for the formation environment of carbonate rocks in the Karst region.