The National Security Agency will create a cybersecurity directorate later this year as part of a wider effort to more closely align the agency’s offensive and defensive operations, U.S. officials said.

Anne Neuberger has been tapped to lead the new directorate, slated to become operational Oct. 1.

The creation of the directorate and selection...