Shouchenglu 守城錄 "On the defence of a city" is a military treatise written during the Southern Song period 南宋 (1127-1279) by Chen Gui 陳規 (1072-1141), courtesy name Yuanze 元則, and Tang Shou 湯璹 (jinshi degree 1187), courtesy name Junbao 君寶. The book is composed of three parts, namely Chen Gui's Jiankang chaoye yeqian houxu 靖康朝野僉言後序 and Shoucheng jiyao 守城機要, both with a length of 1 juan, and Tang Shou's 2 juan-long Jianyan De'an shouyu lu 建炎德安守禦錄 "On the defence of De'an during the Jianyan reign-period (1127-1130)".
The three parts were unified into one book during the reign of Emperor Ningzong 宋寧宗 (r. 1194-1224) and printed in this form. The three texts were written as the results of personal observations and experiences by the two authors. Chen Gui, for instance, describes firearms and a hand cannon made of bamboo canes he had personally seen in use in 1132. This is the earliest mention of firearms in China.
Weapons, tools, and tactics to defend a city during a siege are described. It was essential for the beleaguered city to make excursions and attack the besieger's troops. For contemporary warfare, rebuilding city gates, walls and moats was necessary to make them stronger. For instance, the towers at the corners of the city wall should be equipped with light artillery. The gates should be simpler and not be accompanied by secondary towers. The height and width of the city wall were also to be adapted to modern warfare, and the moat was to be broader to impede the enemy from applying climbing tools or machines. Artillery, with or without fire, was to be placed on the city wall from which the target could be fixed better.
The earliest extant copies are a manuscript version from 1775, which provided the text in the imperial series Siku quanshu 四庫全書, and two prints from the early 19th century.