Biodiesel is an oxygenated diesel fuel made from vegetable oils and animal fats by conversion of the triglyceride fats to esters via transesterification. In this study we examined biodiesels produced from a variety of real-world feedstocks as well as pure (technical grade) fatty acid methyl and ethyl esters for emissions performance in a heavy-duty truck engine. The objective was to understand the impact of biodiesel chemical structure, specifically fatty acid chain length and number of double bonds, on emissions of NOx and particulate matter (PM). A group of seven biodiesels produced from real-world feedstocks and 14 produced from pure fatty acids were tested in a heavy-duty truck engine using the U.S. heavy-duty federal test procedure (transient test). It was found that the molecular structure of biodiesel can have a substantial impact on emissions. The properties of density, cetane number, and iodine number were found to be highly correlated with one another. For neat biodiesels, PM emissions were essentially constant at about 0.07 g/bhp-h for all biodiesels as long as density was less than 0.89 g/cm3 or cetane number was greater than about 45. NOx emissions increased with increasing fuel density or decreasing fuel cetane number. Increasing the number of double bonds, quantified as iodine number, correlated with increasing emissions of NOx. Thus the increased NOx observed for some fuels cannot be explained by the NOx/PM tradeoff and is therefore not driven by thermal NO formation. For fully saturated fatty acid chains the NOx emission increased with decreasing chain length for tests using 18, 16, and 12 carbon chain molecules. Additionally, there was no significant difference in NOx or PM emissions for the methyl and ethyl esters of identical fatty acids.