The plasma instability of two-dimensional electron gas (2DEG) is a crucial physical mechanism for generating terahertz radiation in field-effect transistors, especially in high electron mobility transistors (HEMTs). In this paper, we have proposed a new semi-analytical and semi-numerical method to deal with oscillation problems of any nonuniform 2DEG plasma, especially considering the steady-state distribution, which can be calculated and analyzed more quickly than only using numerical calculation. By constructing a wave equation, using the auxiliary function and Wentzel–Kramers–Brillouin approximation method, the wave vector of the plasma wave is obtained. On this basis, combined with the Dyakonov–Shur instability's boundary conditions, the oscillation frequency, the wave amplitude increment, and their correction caused by the nonuniformity can be obtained by numerical calculation. Furthermore, the analytical solution is obtained under reasonable approximate conditions for the linear distribution of electron concentration. It is proved that the electron concentration gradient in the channel will not only attenuate the wave increment but also decrease the plasmonic frequency in the case of linear distribution. Moreover, we get the reasons for the above conclusions through theoretical derivation. We also investigate the effects of various device parameters on attenuation, such as gate length, electron mobility, and voltage, which may explain the difference between the actual and theoretical values in HEMTs and provide new guidance for device design.