This paper presents a complete Xuan-Liang unified field theory, achieving a comprehensive theoretical construction from basic physical concepts to cosmology and emergent gravity. Starting from the basic definition of Xuan-Liang \( X = \frac{1}{3}m v^3 \), through rigorous mathematical-physical derivation, we construct the unified equation of Xuan-Liang theory. The theoretical core contains two aspects: First, interpreting the Xuan-Liang field as a "Xuan-Liang fluid" filling the universe, which has a state equation with phase transitions and curvature-dependent viscoelasticity, providing a unified description of dark matter and dark energy phenomena. Second, through covariant Reynolds averaging and turbulent stress analysis, we strictly prove the emergence mechanism of Einstein's field equations from Xuan-Liang fluid dynamics, achieving a microscopic origin explanation for gravity, inertia, and spacetime geometry. In particular, we prove that under appropriate limits, the unified equation can naturally reduce to Einstein's field equations of general relativity, Newton's gravitational potential equation, and cosmological dynamic phase transition equations. Using the latest observational data (Planck 2018, Pantheon+ supernovae, BAO, galaxy rotation curves) to constrain the theoretical parameters, the results show high compatibility with observations. Xuan-Liang theory provides a new unified theoretical framework for addressing problems of dark matter, dark energy, quantum gravity, and the nature of spacetime.