A computational study was performed for the formation of polycyclic aromatic hydrocarbons (PAHs) in the n-heptane laminar premixed flame and the homogeneous charge compression ignition (HCCI) combustion. A detailed reaction mechanism describing fuel pyrolysis and oxidation, benzene formation, and PAHs mass growth and oxidation including 107 species and 542 elementary reactions was adopted. The species concentration distributions were analyzed numerically in the laminar premixed n-heptane flame. The computational results compared well with experimental data show that this reaction mechanism can be used to predict reaction products in premixed n-heptane combustion. A single zone model which can numerical simulate the combustion process and emissions of HCCI engine were built. The formation and evolvement mechanisms of PAHs in n-heptane HCCI combustion were simulated.