This paper obtains logarithmic asymptotics of moderate deviations of the stochastic process of the number of customers in a many-server queue with generally distributed inter-arrival and service times under a heavy-traffic scaling akin to the Halfin–Whitt regime. The deviation function is expressed in terms of the solution to a Fredholm equation of the second kind. A key element of the proof is the large-deviation principle in the scaling of moderate deviations for the sequential empirical process. The techniques of large-deviation convergence and idempotent processes are used extensively.