Boron nitride (BN) nanofiller-based polymer composites have been considered promising candidates for efficient heat-dissipating packaging materials because of their superior thermal conductivity, mechanical strength, and chemical resistance. However, strong aggregation of the BN nanofillers in the composite matrix as well as the difficulty in the modification of the chemically inert surface prevents their effective use in polymer composites. Herein, we report an effective method by using in situ stabilizers to achieve homogeneous dispersion of boron nitride (BN) nanofillers in an epoxy-based polymeric matrix and demonstrate their use as efficient heat-dissipating materials. Poly(4-vinylpyridine) (P4VP) is designed and added into the epoxy resin to produce in situ stabilizers during preparation of hexagonal BNs (h-BNs) and BN nanotubes (BNNTs) dispersion. In-depth experimental and theoretical studies indicated that the homogeneous distribution of BN nanofillers in epoxy composites achieved by using the in situ stabilizer enhanced the thermal conductivity of the composite by similar to 27% at the same concentration of the BN nanofillers. In addition, the thermal conductivity of the h-BN/epoxy composite (similar to 3.3 W/mK) was dramatically improved by similar to 48% (4.9 W/mK) when the homogeneously dispersed BNNTs (similar to 1.8 vol %) were added. The concept of the proposed in situ stabilizer can be further utilized to prepare the epoxy composites with the homogeneous distribution of BN nanofillers, which is critical for reproducible and position-independent composite properties.