Terahertz radiation emission from an electrically excited AlGaN/GaN heterostructure with a surface metal grating was studied under conditions of two-dimensional (2D) electron heating by the lateral electric field. Intensive peaks related to nonequilibrium 2D plasmons were revealed in the terahertz emission spectra with up to 4 times selective amplification of the radiation emission in the vicinity of 2D plasmon resonance. This selective emission was shown to be frequency-controllable by the grating period. Exact spectral positions of the 2D plasmon resonances were preliminarily experimentally detected with the help of equilibrium transmission spectra measured at various temperatures. The resonance positions are in a satisfactory agreement with the results of theoretical simulation of the transmission spectra performed using a rigorous solution of Maxwell's equations. The effective temperature of hot 2D electrons was determined by means of I- V characteristics and their analysis using the power balance equation. It was shown that for a given electric field, the effective temperature of nonequilibrium 2D plasmons is close to the hot 2D electron temperature. The work may have applications in GaN-based electrically pumped emitters of terahertz radiation.