Confucius was born of an aristocratic but impoverished family in the state of Lu, part of the present province of Shandong (Shantung), and his father died when he was two. He married at 19, and became a government official in Lu with a retinue of disciples, mostly young gentlemen whom he was preparing for government service. He was promoted to ministerial rank and enjoyed a successful and highly popular career, which eventually attracted jealousy and hostility and led to a breach with the ruler.
In 497 he left Lu and for a dozen years became an itinerant sage, wandering from court to court seeking a sympathetic patron and attended by a company of his disciples. In about 485 he returned to Lu and spent his final years teaching and possibly writing. After his death his pupils compiled a volume of memorabilia, the Analects, which record Confucius' sayings and doings; most of the other works attributed to him are later compilations which, like the philosophy of 'Confucianism' itself, are probably only loosely related to his own teachings.
Confucius emerges as a great moral teacher who tried to replace the old religious observances with moral values as the basis of social and political order. In his Way (dao) he emphasized the practical virtues of benevolence (ren), reciprocity (shu), respect and personal effort which were to be interpreted pragmatically with regard to individual circumstances and cases rather than any abstract system of imperatives. Succeeding generations revered him and Confucianism became the state religion of China, which, until recently, it remained.