  We show that driving a two-dimensional electron gas by an in-plane electric
field oscillating at the frequency $\omega$ gives rise to an electric current
at $2\omega$ flowing near the edge of the system. This current has both
parallel and perpendicular to the edge components, which emit electromagnetic
waves at $2\omega$ with different polarizations. We develop a microscopic
theory of such an edge second harmonic generation and calculate the edge
current at $2\omega$ in different regimes of electron transport and electric
field screening. We also show that at high frequencies the spatial profile of
the edge current contains oscillations caused by excitation of plasma waves.
