First time: There was a massacre during the Hou Jing Rebellion in the Northern and Southern Dynasties.
The second time: a massacre occurred when the Taiping Heavenly Kingdom invaded Nanjing.
The third time: another massacre happened when Zeng Guofan invaded Nanjing.
The last time: the massacre when Japan invaded Nanjing.