Using the overset grid method, this paper numerically studies the unsteady mode transition from the turbojet mode to the ramjet mode of a 2D TBCC inlet with multiple movable panels, for the first time. The flow field during mode transition is highly unsteady so that the steady simulation is not appropriate. Under the baseline mode transition strategy, the instability of shock waves near the throat causes the oscillation of inlet exit performance parameters. In addition, mode transitions under different turbojet back pressure are investigated, and the oscillation occurs in most cases. In order to suppress the oscillation and increase the total pressure recovery, the Unsteady Panel to Panel Optimization Method (UPPOM) is proposed to optimize the final rotation angles of movable panels. In UPPOM, the movable panels operate in a designed motion pattern, where the mode transition process is divided into two steps, namely geometry adaption and flowpath switching. After geometry adaption, the oscillation is successfully removed, and the total pressure recovery at the turbojet flowpath exit is increased by 4.24%. In the second step of optimization, a new optimization index of Weighted Total Pressure Recovery (WTPR) is employed to increase the overall performance of TBCC inlet. In the sense of the WTPR, the performance of the optimization result is increased by 5.92%. (C) 2021 Elsevier Masson SAS. All rights reserved.