This paper presents an online optimization method for metro network train scheduling and passenger flow assignment based on multi-agent reinforcement learning, aiming at minimizing traction energy consumption and average passenger waiting time. The problem is modeled as a multi-agent Markov decision process using a multi-agent actor-critic framework for network train scheduling and a deep deterministic policy gradient framework for passenger flow assignment. All agents interact with the same metro simulation environment, which generates train timetables and passenger flow assignments that meet complex constraints. Results of the case study on anonymized data of Chongqing Metro show that the proposed method outperforms baseline scenarios and is able to adjust train schedules and passenger flow assignments in real-time when passenger flow distribution fluctuates, demonstrating its effectiveness and robustness.