Context. M 81 is an ideal laboratory to investigate the galactic chemical and dynamical evolution through the study of its young and old stellar populations.Aims. We analyze the chemical abundances of planetary nebulae and H ii regions in the M 81 disk for insight on galactic evolution, and compare it with that of other galaxies, including the Milky Way.Methods. We acquired Hectospec/MMT spectra of 39 PNe and 20 H ii regions, with 33 spectra viable for temperature and abundance analysis. Our PN observations represent the first PN spectra in M 81 ever published, while several H ii region spectra have been published before, although without a direct electron temperature determination. We determine elemental abundances of helium, nitrogen, oxygen, neon, sulfur, and argon in PNe and H ii regions, and determine their averages and radial gradients. Results. The average O/H ratio of PNe compared to that of the H ii regions indicates a general oxygen enrichment in M 81 in the last ∼10 Gyr. The PN metallicity gradient in the disk of M 81 is Δlog(O/H)/ΔR G = −0.055 ± 0.02 dex/kpc. Neon and sulfur in PNe have a radial distribution similar to that of oxygen, with similar gradient slopes. If we combine our H ii sample with the one in the literature we find a possible mild evolution of the gradient slope, with results consistent with gradient steepening with time. Additional spectroscopy is needed to confirm this trend. There are no type I PNe in our M 81 sample, consistently with the observation of only the brightest bins of the PNLF, the galaxy metallicity, and the evolution of post-AGB shells. Conclusions. Both the young and the old populations of M 81 disclose shallow but detectable negative radial metallicity gradient, which could be slightly steeper for the young population, thus not excluding a mild gradients steepening with the time since galaxy formation. During its evolution M 81 has been producing oxygen; its total oxygen enrichment exceeds that of other nearby galaxies.