Main sequence M stars pose an interesting problem for astrobiology: their abundance in our galaxy makes them likely targets in the hunt for habitable planets, but their strong chromospheric activity produces high-energy radiation and charged particles that may be detrimental to life. We studied the impact of the 1985 April 12 flare from the M dwarf AD Leonis (AD Leo), simulating the effects from both UV radiation and protons on the atmospheric chemistry of a hypothetical, Earth-like planet located within its habitable zone. Based on observations of solar proton events and the Neupert effect, we estimated a proton flux associated with the flare of 5.9 × 10⁸ protons cm⁻² sr⁻¹ s⁻¹ for particles with energies >10 MeV. Then we calculated the abundance of nitrogen oxides produced by the flare by scaling the production of these compounds during a large solar proton event called the Carrington event. The simulations were performed with a 1-D photochemical model coupled to a 1-D radiative/convective model. Our results indicate that the UV radiation emitted during the flare does not produce a significant change in the ozone column depth of the planet. When the action of protons is included, the ozone depletion reaches a maximum of 94% two years after the flare for a planet with no magnetic field. At the peak of the flare, the calculated UV fluxes that reach the surface, in the wavelength ranges that are damaging for life, exceed those received on Earth during less than 100 s. Therefore, flares may not present a direct hazard for life on the surface of an orbiting habitable planet. Given that AD Leo is one of the most magnetically active M dwarfs known, this conclusion should apply to planets around other M dwarfs with lower levels of chromospheric activity.