This study aimed to analyze the production of poly(3-hydroxybutyrate) (PHB) from lignocellulosic biomass through a series of steps, including microwave irradiation, ammonia delignification, enzymatic hydrolysis, and fermentation, using the Bacillus megaterium ATCC 14581 strain. The lignocellulosic biomass was first pretreated using microwave irradiation at different temperatures (180, 200, and 220 °C) for 10, 20, and 30 min. The optimal pretreatment conditions were determined using the central composite design (CCD) and the response surface methodology (RSM). In the second step, the pretreated biomass was subjected to ammonia delignification, followed by enzymatic hydrolysis. The yield obtained for the pretreated and enzymatically hydrolyzed biomass was lower (70.2%) compared to the pretreated, delignified, and enzymatically hydrolyzed biomass (91.4%). These hydrolysates were used as carbon substrates for the synthesis of PHB using Bacillus megaterium ATCC 14581 in batch cultures. Various analytical methods were employed, namely nuclear magnetic resonance (1H-NMR and13C-NMR), electrospray ionization mass spectrometry (EI-MS), X-ray diffraction (XRD), Fourier transform infrared spectroscopy (FT-IR), and thermogravimetric analysis (TGA), to identify and characterize the extracted PHB. The XRD analysis confirmed the partially crystalline nature of PHB.