In this study, the effect of formaldehyde on phytochemical content and antioxidant activity of Agaricus bisporus was investigated. Synthetic compost based on wheat straw was prepared by fermentation and disinfection. After steam pasteurization, 5 g of A. bisporus mycelia were inoculated into 1 kg of compost. To determine the effects of formaldehyde, 2, 4, and 6% concentrations were added to the composts, while compost without formaldehyde was used for the control group. The harvesting period was set at 10 weeks. Total phenolic and flavonoid content, macro- and microelement profile, and phenolic content were analyzed in the harvested A. bisporus samples. Macro- and microelement content was determined by ICP-OES, and phenolic compound profile was determined by LC-MS/MS analysis. Formaldehyde levels in A. bisporus samples were determined by the acetylacetone spectrophotometry method. The antioxidant capacity of A. bisporus samples was determined by DPPH scavenging activity; antimutagenic effects of samples were determined by Allium test. Application of 2, 4, and 6% formaldehyde resulted in a 1.12-, 1.19-, and 2.07-fold reduction in total phenolic content, respectively. The total phenolic content was reduced between 34.4% and 71.8%. These changes were confirmed by LC-MS/MS analysis. Compounds such as protocatechuic acid, salicylic acid, ferulic acid, and 4-OH benzoic acid, which were detected in the control group, could not be detected in the samples treated with 6% formaldehyde, and it was found that the application of formaldehyde reduced the phenolic content. Similar changes were also observed in macro- and microelements, and significant changes in elemental contents were observed after formaldehyde application. While the presence of formaldehyde at a low level, which may be due to natural production, was detected in the control group, a residue of 11.41 ± 0.93 mg/kg was determined in the 6% FMD applied group. All these changes resulted in a decrease in the antioxidant activity of A. bisporus. The DPPH scavenging activity, which was determined in the range of 21.6–73.3% in the control samples, decreased to 12.3–56.7% in the samples treated with formaldehyde. These results indicate that the application of formaldehyde at different stages of A. bisporus cultivation leads to significant changes in the nutritional value and biological activity of A. bisporus.