The finite-amplitude instability of the buoyancy-driven boundary layer is considered on a vertical plate immersed in a thermally stratified ambient medium, where the wall and surrounding fluid have different temperature gradients. Although the linear stability in this configuration has been investigated, the finite-amplitude solution arising from the critical instability has been studied only for specific parameter values. We extend this by using the amplitude expansion method. The primary bifurcations to the two-dimensional least unstable mode for different temperature gradient ratios ( $0 \leqslant \lambda \leqslant 10$ ) and Prandtl numbers ( $10^{-1} \leqslant Pr \leqslant 10^{4}$ ) are investigated. Only supercritical bifurcations are found to occur when $0 \leqslant \lambda < 2$ and $Pr \leqslant 2800$ , while subcritical bifurcations are also found for larger values of temperature gradient ratio and Prandtl number. Analysis of the contribution of the nonlinear terms in the Landau coefficient reveals that the interaction of the modification of the mean flow and second harmonic for velocity with the fundamental mode for temperature plays an important role in subcritical bifurcation. Based on the Landau equation, the threshold amplitude of the nonlinear equilibrium solution is discussed as well. These encouraging results should be helpful for understanding such a buoyancy-driven flow system.