New Taipei City was known as Taipei County before its upgrade in 2010. After the county's population overtook that of Taipei City, it was decided that the county should be upgraded to city status but could not be renamed "Taipei City".
The name of the new entity (新北市; "new north city") was at first rendered in English as Xinbei via pinyin romanization, but both candidates for the city's first mayoral election opposed the name. Consequently, citing public opinion, the inaugural mayor, Eric Chu, requested and received approval from the Ministry of the Interior (MOI) to render the name in English as New Taipei City. This rendering became official on 31 December 2010.
Archaeological records show that New Taipei City had been inhabited since the Neolithic period, with artifacts dug in Bali District having shown remains as early as 7000 to 4700 BC. The region around New Taipei City area was once inhabited by Ketagalan plains aborigines, and evidence shows that the Atayal had inhabited Wulai District. The earliest recorded migration by people from mainland China dated back as early as 1620, when the local tribes were driven into the mountain areas. Over the years, many of the aborigines have assimilated into the general population.
During the Qing Dynasty rule of Taiwan, the Han Chinese people began to settle in the area now designated as New Taipei City in 1694 and the number of immigrants from mainland China had further increased. After decades of development and prosperity, Tamsui had become an international commercial port by 1850. British consulate and stores were established in the region, which helped promote the local tea business, resulting in massive tea leaf exports to Europe. In 1875, Shen Baozhen called for the establishment of Taipeh Prefecture. Fujian-Taiwan-Province was declared in 1887 and the present-day New Taipei City area fell under the jurisdiction of Taipeh Prefecture.
In 1895, Taiwan was ceded by the Qing dynasty to the Empire of Japan. During Japanese rule, the New Taipei City area was administered under Taihoku Prefecture together with modern-day Taipei, Keelung and Yilan County. Gold and other mineral deposits were discovered at Keelung Mountain, triggering a mining boom in the region. In October 1896, the Japanese government divided the mining area around Keelung Mountain into two districts: an eastern district, designated as Kinkaseki, and a western district, designated as Kyūfun. Both districts are now parts of Ruifang District. They also issued regulations barring local Taiwanese mining companies from mining in the area, giving the mining rights to Japanese companies instead.