Shimen used to be Tianxing County of Fujian Province in Ming Dynasty. During Emperor Kangxi"s reign in Qing Dynasty, Shimen was put under jurisdiction of Zhuluo County. The area was then divided and put under jurisdictions of Damsui County and Keelung Prefecture during Emperor Guangxu"s term of rule. During the Japanese colonial period, Taipei Prefecture was established within the area while the western and eastern parts of area belonged respectively to Damsui and Keelung Subprefecture. In 1909 October, Shimen went under reorganization, and Keelung Prefecture was merged into Taipei Prefecture. The area"s western part was put under jurisdiction of Xiaokeelung Subprefecture, Laomei District, and the eastern part is under jurisdiction of Jinbaoli Subprefecture and Alilao District.