Rebuilding the walls of Jerusalem faced intense external opposition. Nehemiah responds to this hostility with a harsh prayer directed at the enemies attempting to disrupt the construction, asking God to withhold forgiveness for their sins. He pleads that the wrongdoings of these adversaries remain entirely exposed and un-erased before God. The intention behind this request is that God will keep their actions in His memory, allowing His anger to rise so that He may punish them appropriately when the time comes [מצודת דוד, ביאור שטיינזלץ].
The severity of this prayer is a direct response to the enemies' behavior on the construction site. These adversaries deliberately positioned themselves right in front of the people building the wall, openly mocking them and displaying intense anger [רש״י, ביאור שטיינזלץ]. Their ultimate goal was psychological. They intended to break the spirit of the workers, hoping that the constant ridicule and hostility would cause the builders to lose their resolve and abandon the project entirely [מצודת דוד].