Ex situ conservation is an important wildlife conservation strategy, but endangered wildlife in captivity often exhibit high disease rates. Commensal microorganisms are vital for homeostasis, immunity, and linked to diseases. This study analyzed the structure, assembly, variations of the symbiotic microbiota of the endangered crocodile lizard, and their relationship with environment, as well as the effects of captivity on them, to explore why captive reptiles face high dermatosis rates. Results showed that the reptile's microbiota significantly differ from that of its habitat, demonstrating niche specificity. While species richness among organs showed no significant differences, microbial diversity varied considerably. Skin microbiota showed no site-specific clustering. The assembly of skin, oral, and intestinal bacterial communities was dominated by homogeneous selection. The gut and oral bacterial networks were resilient to disturbances, while the skin bacterial network was sensitive. Captivity primarily affected the skin microbiota, reducing its diversity and stability, thereby increasing disease risk, and these effects were not solely attributable to environmental changes. These findings suggested that skin microbial changes in captive reptiles may be responsible for their increased susceptibility to dermatosis in ex situ conservation. This study underscored the importance of understanding reptile-associated microbes for effective conservation strategies and offers potential solutions.