This paper addresses a new class of train scheduling problems with two interconnected high-speed rail lines under given and precise time-dependent origin-destination demand input. The proposed systematic schedule synchronization approach focuses on satisfying the requirements of transfer passengers from one rail line to another rail line. Aiming to minimize passenger waiting times at stations and crowding disutility in trains, a nonlinear optimization model for a single-line case is formulated to demonstrate the modeling framework of train scheduling problems. The model is then extended to a two-line case by explicitly taking into account the number of boarding and alighting passengers at the connection station. Using a state-space representation, a novel dynamic programming algorithm is designed to solve the single-line problem as a deterministic finite-state problem with sequential decisions. An integer coding-based genetic algorithm procedure is developed to solve the proposed model for general cases with two lines. A simplified real-world example illustrates that the designed schedule is beneficial to the through passengers and transfer passengers simultaneously.