Why and how did simple and unordered substances on Earth evolve into complex, orderly, and diverse organisms and social organizations? Here we propose the Carbon-Based Evolutionary Theory (CBET) to provide an explicit and comprehensive answer to this fundamental scientific question. The CBET is based on the integration of the principles of physics and chemistry (e.g., laws of thermodynamics), the features of Earth (e.g., having abundant water and energy), and the features of carbon-based materials (CBMs) using rational logic and abundant evidence from a panoramic view. The integration reveals the driving force mechanism, the structure-function mechanism, and the natural selection mechanism, which underpin evolution with energy supply, function generation, and structural optimization, respectively. These three mechanisms escalate the hierarchy of CBMs, augment the quantity, diversity, and orderliness of high-hierarchy CBMs, and lead to chemical, biological, and social evolution. The CBET uncovers the natural roots of multiple pivotal and seemingly paradoxical social notions, such as inclusiveness versus elimination, cooperation versus competition, and altruism versus selfishness. It advocates for the balanced, harmonious, and peaceful development of human society. The CBET could unify biology with physics and chemistry, bridge the natural sciences and the social sciences, and guide the rational development of human society.