Plastic pollution is a pressing environmental challenge, necessitating the development of biodegradable alternatives like polyhydroxybutyrate (PHB). This study focuses on optimizing PHB production by Neobacillus niacini GS1, a bacterium isolated from a municipal dumping site. By utilizing agricultural residues such as corn flour, wheat bran, and peptone as substrates, we aimed to establish an eco-friendly method for biopolymer production, contributing to sustainable agricultural residue management and bioplastic innovation. The bacterium was identified using morphological, biochemical, and molecular techniques. The optimization process involved adjusting variables such as inoculum age, inoculum size, incubation time, agitation rate, incubation temperature, pH of the medium, carbon sources, and nitrogen sources. Response surface methodology (RSM) was employed to identify optimal conditions, with the highest PHB yield of 61.1% achieved under specific conditions: 37 °C, pH 7, and an agitation rate of 150 rpm. These findings underscore the potential of Neobacillus niacini GS1 in converting agro-industrial residues into valuable biopolymers, promoting sustainable bioplastic production, and advancing agricultural residue valorization efforts through the use of eco-friendly materials.