The increasing antibiotic resistance due to inappropriate administration of antibiotics is a huge concern for the scientific society, recurring the demand for novel antibiotics against antibiotic‐resistant bacteria. In this study, ABN18 bacterial strain was isolated from sewage wastewater with antibacterial substance production ability and was identified as Stenotrophomonas sp. by partial 16S rRNA sequencing. The isolated bacterial strain was Gram‐negative, long oval‐shaped, motile, nonendospore forming with an average length of 1.7025 μm determined by environmental scanning electron microscope (ESEM). Stenotrophomonas sp. ABN18 was found to have a flexible carbohydrate preference, only unable to grow in sorbitol. The strain showed moderate antibiotic resistance with significant sensitivity against antibiotics such as ceftazidime, doxycycline hydrochloride, and rifampicin. Antibacterial activity of ABN18 was found to be more active against Gram‐negative strains as compared with Gram‐positive bacterial strains. The well‐diffusion study confirmed the extracellular production of the antibacterial substance and its presence in the fermentation broth. Moreover, the temperature, pH, and incubation time were optimized at 33.17°C, 7.45, and 88.8 h, respectively, to maximize antibacterial substance production, and the highest zone of inhibition diameter of 22 mm against E. coli was achieved.