Biomass-derived carbon materials have attracted considerable attention in electromagnetic wave (EMW) absorption applications due to their advantages of low cost, light weight, and sustainability. Herein, bagasse-based porous carbon (BPC) was prepared by canonization and activation process from natural waste bagasse. The porous flower-like MoS2/BPC composites were successfully prepared for efficient microwave absorption via hydrothermal process by in-situ formation of flower-like MoS2 into the porous structure of BPC. The effect of hydrothermal time and hydrothermal temperature on surface morphology, degree of graphitization, surface chemical composition and impedance matching of the prepared samples was investigated. Results demonstrated that when the hydrothermal temperature was 220 °C, and the hydrothermal time was 24 h, the obtained MoS2/BPC sample (named as MoS2/BPC-220 ℃) showed the minimum reflection loss value (RL) of − 41.6 dB at 8.96 GHz and exhibited effective microwave absorption bandwidth (EAB) of 4.32 GHz at a relatively thin thickness of 1.5 mm. This work provides a promising way to prepare novel biomass-derived porous carbon for strong broadband electromagnetic absorption.