Acacia melanoxylon is well known as a valuable commercial tree species owing to its high-quality heartwood (HW) products. However, the metabolism and regulatory mechanism of heartwood during wood development remain largely unclear. In this study, both microscopic observation and content determination proved that total amount of starches decreased and phenolics and flavonoids increased gradually from sapwood (SW) to HW. We also obtained the metabolite profiles of 10 metabolites related to phenolics and flavonoids during HW formation by metabolomics. Additionally, we collected a comprehensive overview of genes associated with the biosynthesis of sugars, terpenoids, phenolics, and flavonoids using RNA-seq. A total of ninety-one genes related to HW formation were identified. The transcripts related to plant hormones, programmed cell death (PCD), and dehydration were increased in transition zone (TZ) than in SW. The results of RT-PCR showed that the relative expression level of genes and transcription factors was also high in the TZ, regardless of the horizontal or vertical direction of the trunk. Therefore, the HW formation took place in the TZ for A. melanoxylon from molecular level, and potentially connected to plant hormones, PCD, and cell dehydration. Besides, the increased expression of sugar and terpenoid biosynthesis-related genes in TZ further confirmed the close connection between terpenoid biosynthesis and carbohydrate metabolites of A. melanoxylon. Furthermore, the integrated analysis of metabolism data and RNA-seq data showed the key transcription factors (TFs) regulating flavonoids and phenolics accumulation in HW, including negative correlation TFs (WRKY, MYB) and positive correlation TFs (AP2, bZIP, CBF, PB1, and TCP). And, the genes and metabolites from phenylpropanoid and flavonoid metabolism and biosynthesis were up-regulated and largely accumulated in TZ and HW, respectively. The findings of this research provide a basis for comprehending the buildup of metabolites and the molecular regulatory processes of HW formation in A. melanoxylon.