Levoglucosan is an anhydrosugar from biomass that has important applications as a platform for obtaining many value-added derivatives with high demand in the chemical industry and bioproducts by fermentation, including biofuels, among others. Thus, the experimental strategy was to intensify the levoglucosan production in the condensable fraction (bio-oil) from pyrolysis gases using different biomass pretreatments before fast pyrolysis according to the following conditions: (a) biomass washing with 10\% acetic acid; (b) biomass washing with 0.1\% HNO3, followed by impregnation with 0.1\% H2SO4; and (c) biomass impregnation with 0.1\% H2SO4. The pyrolysis was carried out in a pyroprobe reactor, coupled to GC/MS to verify the progress of the chemicals formed at 400, 500, and 600 degrees C. Although levoglucosan was the main target, the programs showed more than 200 pyrolytic compounds of which more than 40 were identified, including organic acids, ketones, aldehydes, furans, and phenols. Then, principal component analysis (PCA) allowed for the discrimination of the simultaneous effect of biomass acid treatment and pyrolysis temperature on the formation of the pyrolytic products. All treated biomasses with acids resulted in a levoglucosan yield increase, but the best result was achieved with acetic acid at 500 degrees C which resulted from 7-fold higher levoglucosan production with changes in the profiles by-products formed concerning untreated biomass. This result was attributed to the alkali and alkaline earth metals reduction and partial removal of lignin content and extractives by acid washing, increasing the cellulose and hemicellulose relative content in the treated biomass. This hypothesis was also confirmed by scanning electron microscope (SEM) and Fourier transform infrared (FTIR) qualitative analysis. Thus, the results achieved in this work show the potential of this biomass for levoglucosan production and other pyrolytic products, thereby being able to mitigate the environmental impact of this agricultural residue and contribute to the development of the coffee agro-industrial chain and the production of bioenergy from lignocellulosic biomass.