In this work, we show that the inverse-λ shape in the fundamental diagram of traffic flow can be produced dynamically by a simple nonlinear mesoscopic model with stochastic noises. The proposed model is based on the gas-kinetic theory of the traffic system. In our approach, the nonlinearity leads to the coexistence of different traffic states. The scattering of the data is thus attributed to the noise terms introduced in the stochastic differential equations and the transition among the various traffic states. Most importantly, the observed inverse-λ shape and the associated sudden jump of physical quantities arise due to the effect of stochastic noises on the stability of the system. The model parameters are calibrated, and a qualitative agreement is obtained between the data and the numerical simulations.