We have investigated the electron spin resonance (ESR) on single crystals of BaCu$_2$Ge$_2$O$_7$ at temperatures between 300 and 2 K and in a large frequency band, 9.6 -134 GHz, in order to test the predictions of a recent theory, proposed by Oshikawa and Affleck (OA), which describes the ESR in a $S$=1/2 Heisenberg chain with the Dzyaloshinskii-Moriya interaction. We find, in particular, that the ESR linewidth, $Delta H$, displays a rich temperature behavior. As the temperature decreases from $T_{max}/2approx $ 170 K to 50 K, $Delta H$ shows a rapid and linear decrease, $Delta H sim T$. At low temperatures, below 50 K, $Delta H$ acquires a strong dependence on the magnetic field orientation and for $H | c$ it shows a $(h/T)^2$ behavior which is due to an induced staggered field $h$, according to OAs prediction.