Biomass serves as a crucial source of renewable energy and potential raw materials for synthesizing various value-added chemicals. This study explored the direct conversion of the cellulose of passion fruit shells into 5-hydroxymethylfurfural (5-HMF), a promising substitute for fossil-derived compounds, by combining halogenated metal ionic liquids (ILs) and organic acids through one-pot hydrothermal reaction. Factors such as the type of ILs and organic acids, reaction time and temperature, as well as the quantity of dimethyl sulfoxide (DMSO) in the solvent, and the loading of substrate, IL, and organic acid were investigated for their impact on 5-HMF yield. Optimization of reaction conditions led to the attainment of the highest 5-HMF yield, reaching 33.1 ± 0.34 % based on the cellulose content within the passion fruit shell. Furthermore, the structural and morphological changes of the solid residues were analysed through techniques such as Fourier transform infrared spectroscopy (FTIR) and scanning electron microscopy (SEM). These analyses revealed the progressive conversion of cellulose, hemicellulose, and lignin, accompanied by the formation of humin by-products. This integrated approach for 5-HMF production from agricultural waste introduced novel possibilities for transforming sustainable biomass resources into valuable chemical products.