This study solves an integrated operational problem regarding hierarchical service network design and passenger assignment for urban rail transit systems. We propose an innovative nonlinear programming model for determining the number of stocking trains at each depot, number of operating trains on each line, and line-based service frequency and capacity. Given a certain passenger demand matrix, this model simultaneously determines the system-optimal path flow while assigning passengers to lines to minimize the passenger total travel cost. The proposed nonlinear programming model is then reformulated based on Lagrangian duality as two resource allocation sub-problems represented as artificial neural networks. The forward pass of the train flow sequentially assigns train resources to candidate depots and lines, and the forward pass of the passenger flow sequentially assigns the passenger demand to candidate paths and links. The solution can be improved by backpropagation of the first-order gradients and re-assignment of the train resources and passenger demand with updated weights between different layers under the proposed layered optimization framework. A comparative analysis indicates that the proposed solution approach can obtain an approximate optimal solution for the integrated optimization model, thereby providing an optimized operational hierarchical service plan and system-optimal passenger assignment results. The proposed methodology and solution approach are evaluated on a simple network case and Beijing Metro Network case.