The effect of expansion fan on cavity flameholding was investigated in a rocket-based combined cycle combustor fueled by ethylene. The inflow of the combustor was at a condition where the Mach number, stagnation temperature, and total pressure were 2.92, 1650 K, and 2.6 MPa, respectively. The global equivalence ratio was 0.25. A backward-facing step (BFS) was used to simulate a rocket that was shut down and create an expansion fan. The dimensionless distance between the BFS and the cavity (d/H) varied from 1.5 to 7.5, where d = 60–300 mm was the actual distance and H = 40 mm was the height of the combustor entrance. The result indicated that the cavity shear layer reattached at the cavity floor in the combustor with 2.5 ≤d/H≤ 3.5 because of the pressure gradient resulting from the expansion fan. The expansion fan also significantly decreased the static pressure in the cavity. As a consequence, the combustor with 2.5 ≤d/H≤ 3.5 failed in ignition. In the combustors with d/H = 4.0 and 6.0, the cavity flows were open-type. However, the ignition attempt failed because the expansion fan and the reattachment shock wave might worsen the local equivalence ratio in the cavity. Successful ignition and flame stabilization were achieved in the combustors with d/H = 1.5, 2.0, 4.5, and 7.5. Three combustion modes and three kinds of combustion oscillation were identified. In the combustor with d/H = 1.5, only a small part of the cavity was exposed to the expansion fan. The combustor operated in the cavity stabilized scramjet mode because the flame front was anchored at the cavity leading edge. The cavity shear layer impingement onto the cavity ramp lead to the combustion oscillation with a frequency ranging from 300 to 400 Hz. The combustion mode and combustion oscillation in the combustor with d/H = 2.0 were the same as their counterparts in the combustor with d/H = 1.5. Unsteady jet-wake stabilized scramjet mode was witnessed in the combustor with d/H = 4.5. In this combustor, the fuel jet and the front of the cavity were exposed to the expansion fan. The reattachment shock wave lifted the cavity shear layer. The combustion oscillation induced by shock-flame interaction showed a dominant frequency at 107.1 Hz. The expansion fan and the reattachment shock wave were upstream of the cavity in the combustor with d/H = 7.5. Both of them made the boundary layer more sensitive to adverse pressure gradient. The flame front was upstream of the cavity because the heat release resulting from vigorous chemical reaction choked the combustor and induced large-scale boundary layer separation. The combustor operated in ramjet mode. The unsteady shock train and thermal throat induced the combustion oscillation with a frequency of approximately 800 Hz.