Why did unordered, simple substances on Earth evolve into orderly, complex, and diverse organisms and social organizations? This is a fundamental scientific question that has captivated humans for millennia. Here we propose the Carbon-Based Evolutionary Theory (CBET) to provide novel, direct, explicit, and relatively comprehensive answers to this question. The CBET identifies three key mechanisms based on some well-known principles of physics and chemistry (e.g., laws of thermodynamics) and some features of Earth and carbon-based substances (CBSs): the driving force mechanism that provides energy, the structure-function mechanism that generates new functions, and the natural selection mechanism that accumulates orderliness, all for the evolution of CBSs. These mechanisms lead to the progression from chemical to biological and social evolution, marked by the escalating hierarchy of CBSs and the increase in the quantity, diversity, and orderliness of high-hierarchy CBSs. The CBET clarifies the natural roots of multiple pivotal and seemingly paradoxical social notions, such as inclusiveness versus elimination, collaboration versus competition, altruism versus selfishness, and freedom versus restriction. It advocates for the balanced, harmonious, and peaceful development of human society as well as the integration of all countries into a single harmonious social collective. The CBET unifies biology with physics and chemistry and could be a basic theory shared by the natural sciences and the social sciences. It could also be significant in the rational development of human society.