Solid biofuels and Internet of Things (IoT) technologies play a vital role in the development of smart cities. Solid biofuels are a renewable and sustainable source of energy obtained from organic materials, such as wood, agricultural residues, and waste. The integration of IoT technology with solid biofuel classification can improve the performance, quality control, and overall management of biofuel production and usage. Recently, machine learning (ML) and deep learning (DL) models can be applied for the solid biofuel classification process. Therefore, this article develops a novel solid biofuel classification using sailfish optimizer hybrid deep learning (SBFC-SFOHDL) model in the IoT platform. The proposed SBFC-SFOHDL methodology focuses on the identification and classification of solid biofuels from agricultural residues in the IoT platform. To achieve this, the SBFC-SFOHDL method performs IoT-based data collection and data preprocessing to transom the input data into a compatible format. Moreover, the SBFC-SFOHDL technique employs the multihead self attention-based convolutional bidirectional long short-term memory model (MSA-CBLSTM) for solid biofuel classification. For improving the classification performance of the MSA-CBLSTM model, the SFO algorithm is utilized as a hyperparameter optimizer. The simulation results of the SBFC-SFOHDL technique are tested and the results are examined under different measures. An extensive comparison study reported the betterment of the SBFC-SFOHDL technique compared to recent DL models.