<jats:title>Abstract</jats:title><jats:p>Mycenarubin C, a previously unknown red pyrroloquinoline alkaloid, was isolated from fruiting bodies of the mushroom <jats:italic>Mycena rosea</jats:italic> and its structure was elucidated mainly by NMR spectroscopy and mass spectrometry. Unlike mycenarubin A, the major pyrroloquinoline alkaloid in fruiting bodies of <jats:italic>M. rosea</jats:italic>, mycenarubin C, contains an eight‐membered ring with an additional C<jats:sub>1</jats:sub> unit that is hitherto unprecedented for pyrroloquinoline alkaloids known in nature. Incubation of mycenarubin A with an excess of formaldehyde revealed that mycenarubin C was generated nearly quantitatively from mycenarubin A. An investigation into the formaldehyde content of fresh fruiting bodies of <jats:italic>M. rosea</jats:italic> showed the presence of considerable amounts of formaldehyde, with values of 5 μg per gram of fresh weight in fresh fruiting bodies. Although mycenarubin C did not show bioactivity against selected bacteria and fungi, formaldehyde inhibits the growth of the mycoparasite <jats:italic>Spinellus fusiger</jats:italic> at concentrations present in fruiting bodies of <jats:italic>M. rosea</jats:italic>. Therefore, formaldehyde might play an ecological role in the chemical defence of <jats:italic>M. rosea</jats:italic> against <jats:italic>S. fusiger</jats:italic>. In turn, <jats:italic>S. fusiger</jats:italic> produces gallic acid—presumably to detoxify formaldehyde by reaction of this aldehyde with amino acids and gallic acid to Mannich adducts.