This work investigates the stability and transition to turbulence in a diverging channel subjected to a time-varying trapezoidal-shaped inflow boundary condition. Numerical simulations are performed for different deceleration rates and Reynolds numbers while maintaining a constant acceleration rate. The flow transition begins with two-dimensional primary instability with the formation of inflectional velocity profiles, followed by local separation and the emergence of an array of shear layer vortices. We divide simulation cases systematically into three categories based on the onset of secondary instability and the generation of streamwise vorticity. At low and medium Reynolds numbers (type I), the spanwise vortex rolls formed by inflectional instability remain two-dimensional and diffuse at the channel centre without exhibiting further instabilities. At high Reynolds numbers and deceleration rates (type II), the rolled shear layer exhibits secondary instability during the zero mean inflow phase, followed by local incipient turbulent structure formation. The streamwise vorticity that develops over the shear layer structures causes oscillations with a spanwise wavelength similar to those associated with the elliptic instability in a counter-rotating vortex pair. Using the Lamb–Oseen approximation of vortices in conjunction with the dynamic mode decomposition algorithm of the three-dimensional flow field, we captured successfully the characteristics of the secondary instability. The third category (type III) is characterized by periodic unsteady separation, secondary instability, and merging of shear layer vortices, which occurs when Reynolds numbers are high and deceleration rates are low.