Qufu ( qv1.fu4; ) is a city in southwestern Shandong province, East China. It is located about south of the provincial capital Jinan and northeast of the prefectural seat at Jining. Qufu has an area of 815 square kilometers, and a total population of 653,000 inhabitants, of which, 188,000 live in urban areas.
Qufu is best known as the hometown of Confucius, who is traditionally believed to have been born at nearby Mount Ni. The city contains numerous historic palaces, temples and cemeteries. The three most famous cultural sites of the city, collectively known as San Kong (, are the Temple of Confucius (), the Cemetery of Confucius (), and the Kong Family Mansion (). Together, these three sites have been listed as a UNESCO World Heritage Site since 1994.
The name Qufu literally means "crooked hill", and refers to a mile-long hill that was part of the city during its time as capital of the state of Lu.
The city of Qufu is divided into 4 subdistricts, and 8 towns. The city government is located within 鲁城街道.
During the Shang, the area around Qufu was home to the people of Yan, who were counted by the Chinese among the "Eastern Barbarians" or Dongyi. Along with Pugu (around Binzhou) and Xu (along the Huai River), Yan joined the Shang prince Wu Geng and the Three Guards in their failed rebellion against the Duke of Zhou 1042 BC. After the rebels' defeat, the Duke launched punitive campaigns against the Dongyi, forcing their submission and placing their territory under loyal nobles. The territory of the Yan became part of the state of Lu, who made Qufu their capital throughout the Spring and Autumn period. This city had walls considerably larger than the present Ming-era fortifications, including more land to the east and north.
During the Tang dynasty and the early days of the Song dynasty the city was centered around the present-day Temple of Duke Zhou, at the northeastern corner of today's walled city. At 1012, Qufu was renamed to Xianyuan County (仙源县), and relocated to the new site, some east of today's walled city, next to the supposed birthplace of the legendary Yellow Emperor and the tomb of his son Shaohao.