The active control of urban drainage systems (UDSs) is playing an increasingly important role in the world threatened by urban flooding and associated disasters caused by insufficient drainage capacity. However, little research has recognized the importance of the optimal use of in-pipe storage space. To address this issue, the use of the in-pipe storage capacity was optimized in this study. A novel approach, that is, dynamic programming with successive approximation considering the time lag of flow routing (DPSA-TL), was developed to determine the control policies, in addition to the commonly used passive, rule-based control (RBC), and evolutionary algorithm (EA) strategies. A real-life urban catchment considering flooding control and combined sewer overflow (CSO) reduction was used as the case study. First of all, the potential benefit of maximizing the use of in-pipe storage space was tested using the four control strategies in three storm events, including a 3-year, 2-hour design (46.5 mm), a 5-year, 2-hour design (56.0 mm) and a 7-h historical (152.5 mm) storm events. Results indicate that DPSA-TL performed best in all cases. Without compromising the goal of flooding control, it provided 16.5%, 12.6%, and 3.0% reductions in CSO volume for the three storm events when compared with the passive strategy. Due to the limited capacity of in-pipe storage, the relative improvement diminished as the total rainfall depth increased. Then, control strategies were further applicated to the real-time operation. DPSA-TL was found to be the best alternative for CSO control, with the CSO volume reduced by 14.7%, 11.4%, and 2.5% in the three storm events, respectively. The findings suggest that the performance of UDS can be significantly improved by optimizing the use of in-pipe storage capacity, and the proposed method is effective in the offline optimization and real-time control of UDSs.