Almost a decade after methane was first reported in the atmosphere of Mars there is an intensive discussion about both the reliability of the observations--particularly the suggested seasonal and latitudinal variations--and the sources of methane on Mars. Given that the lifetime of methane in the Martian atmosphere is limited, a process on or below the planet's surface would need to be continuously producing methane. A biological source would provide support for the potential existence of life on Mars, whereas a chemical origin would imply that there are unexpected geological processes. Methane release from carbonaceous meteorites associated with ablation during atmospheric entry is considered negligible. Here we show that methane is produced in much larger quantities from the Murchison meteorite (a type CM2 carbonaceous chondrite) when exposed to ultraviolet radiation under conditions similar to those expected at the Martian surface. Meteorites containing several per cent of intact organic matter reach the Martian surface at high rates, and our experiments suggest that a significant fraction of the organic matter accessible to ultraviolet radiation is converted to methane. Ultraviolet-radiation-induced methane formation from meteorites could explain a substantial fraction of the most recently estimated atmospheric methane mixing ratios. Stable hydrogen isotope analysis unambiguously confirms that the methane released from Murchison is of extraterrestrial origin. The stable carbon isotope composition, in contrast, is similar to that of terrestrial microbial origin; hence, measurements of this signature in future Mars missions may not enable an unambiguous identification of biogenic methane.