The objective of this study was to identify the flavonoid chemical compositions of Dalbergia odorifera heartwood extracts, to investigate their correlation with heartwood color, for establishing an evaluation method for quantifying the quality of the heartwood. The results showed that the heartwood color parameters, L* and b*, were significantly correlated with the total flavonoid contents of the extracts (correlation coefficients of −0.93 and −0.86, respectively). Furthermore, 50 flavonoid components in the extracts were identified by ultra-high-performance liquid chromatography–mass spectrometry (UHPLC–MS), and a method for determining the contents of 16 major components was established. Among the major components, liquiritigenin, dalbergin, calycosin, daidzein and fisetin had significant negative correlations with both L* or b*. This study provides a basis for the establishment of evaluation methods to determine the quality of Dalbergia odorifera heartwood. • The chemical components in D. odorifera heartwood extracts were determined. • The correlation of these components with key factor (wood color), was studied. • Liquiritigenin, dalbergin, calycosin, daidzein and fisetin were the key components affecting the color.