Purpose To evacuate passengers arriving at intercity railway stations efficiently, metros and intercity railways usually share the same station or have stations close to each other. When intercity trains arrive intensively, a great number of passengers will burst into the metro station connecting with the intercity railway station within a short period, while the number of passengers will decrease substantially when intercity trains arrive sparsely. The metro timetables with regular headway currently adopted in real-world operations cannot handle the injected passenger demand properly. Timetable optimization of metro lines connecting with intercity railway stations is essential to improve service quality. Design/methodology/approach Based on arrival times of intercity trains and the entire process for passengers transferring from railway to metro, this paper develops a mathematical model to characterize the time-varying demand of passengers arriving at the platform of a metro station connecting with an intercity railway station. Provided the time-varying passenger demand and capacity of metro trains, a timetable model to optimize train departure time of a bi-direction metro line where an intermediate station connects with an intercity railway station is proposed. The objective is to minimize waiting time of passengers at the connecting station. The proposed timetable model is solved by an adaptive large neighborhood search algorithm. Findings Real-world case studies show that the prediction accuracy of the proposed model on passenger demand at the connecting station is higher than 90%, and the timetable model can reduce waiting time of passengers at the connecting station by 28.47% which is increased by 5% approximately than the calculation results of the generic algorithm. Originality/value This paper puts forward a model to predict the number of passengers arriving at the platform of connection stations via analyzing the entire process for passengers transferring from intercity trains to metros. Also, a timetable optimization model aiming at minimizing passenger waiting time of a metro line where an intermediate station is connected to an intercity railway station is proposed.