The Confucian classic that describes the Great Harmony as an ideal of universal community is the Book of Rites.
The relevant passage, known as the “Li Yun” chapter, describes a condition called datong, commonly translated as “Great Unity” or “Great Harmony.” It portrays a society in which public life is oriented toward the common good, capable people are trusted, and social relationships are governed by ethical norms.
The same passage contrasts datong with a later age in which family interests and institutional distinctions become more prominent. It is therefore both a vision of social harmony and a reflection on political change. Later Chinese thinkers repeatedly reinterpreted the passage when discussing reform, ideal government, and modern utopian ideas.
The Book of Rites is one of the Five Classics, but it is not a single-authored work by Confucius. It is a compilation of ritual writings assembled and transmitted over time, with chapters reflecting different historical layers.