Against the backdrop of developing metro-based passenger and freight co-transportation plans, this study addresses the integrated optimization problem of train scheduling and flow control for a co-transportation metro line, where passengers and freight can share the same trains. Given a set of time-dependent passenger and freight demands, the problem involves determining the space-time trajectories and passenger (or freight) capacities of trains while simultaneously assigning these demands to the trains. To tackle this, train selection variables, carriage arrangement variables, and flow assignment variables are introduced, and the problem is formulated as an integer linear programming model. The objective is to minimize the weighted sum of the number of freight carriages, the total waiting time of all passengers, and the total delay of all freight. The proposed model is equivalent to a mixed-integer linear programming model, which allows a commercial solver to efficiently find the exact solution. To validate the effectiveness of the proposed method, several numerical examples of varying scales are tested. The results demonstrate that integrating the optimization of train schedules and co-transportation plans significantly enhances the efficiency of the entire co-transportation system.