Abstract Polycyclic aromatic hydrocarbons (PAHs) are widely studied in environmental matrices, such as air, water, soil and sediment, because of their toxicity, mutagenicity and carcinogenicity. Because of these properties, the environmental agencies of developed countries have listed sixteen PAHs as priority pollutants. Few countries have limits for these compounds for ambient air, but they only limit emissions from stationary and mobile sources and occupational areas. There are several studies to specifically address the 16 priority PAHs and very little for the alkyl PAHs. These compounds are more abundant, more persistent and frequently more toxic than the non-alkylated PAHs, and the toxicity increases with the number of alkyl substitutions on the aromatic ring. In this study, a method was developed for the analysis of PAHs and alkyl PAHs by using a GC–MS and large injection volume injection coupled with program temperature vaporisation, which allows for limits of detection below 1.0 ng μL−1. Several variables were tested, such as the injection volume, injection velocity, injector initial temperature, duration of the solvent split and others. This method was evaluated in samples from particulate matter from the emissions of engines employing standard diesel, commercial diesel and biodiesel B20. Samples were collected on a dynamometer bench for a diesel engine cycle and the results ranged from 0.5 to 96.9 ng mL−1, indicating that diesel/biodiesel makes a significant contribution to the formation of PAHs and alkyl PAHs.