Polycyclic aromatic hydrocarbons (PAHs) are critical environmental concerns due to their intrinsic toxic aromatic nature and concomitant circumstances that potentially harm the ecological and human health. In this study, converting mahogany (Swietenia macrophylla King) pericarps to value-added biochar by pyrolysis for evaluating the potential formation/destruction of biochar-bound PAHs was studied for the first time. This study designed and optimized the thermal processing conditions at 300-900 degrees C in the CO2 or N-2 atmosphere, and heteroatoms (N, O, B, NB, and NS) were modified for mahogany pericarps biochar (MPBC) production. The MPBC500 exhibited significantly higher pyrolysis products of PAHs (2780 +/- 38 ng g(-1)) than that of MPBC900 (78 +/- 6 ng g(-1)) under N-2 without introducing modified elements. Specifically, the inhibition capacity of MPBC500 for PAHs under CO2 was improved most efficiently by the active nitrogen species of the pyridinic N and pyrrolic N groups. The pyrolysis conditions and heteroatom modification of MPBC altered its physicochemical properties, that is, aromaticity and hydrophobicity, affecting the PAH concentration and composition in the pyrolysis products. This study reveals sustainable approaches to reduce the environmental footprint of biochar by focusing on increases in PAHs pollution in sustainable biochar produced from a low-carbon bioeconomy perspective.