<title>Abstract</title> This article proposes a bacterial-chemotaxis-based bio-inspired algorithm (BCBTOA) to solve structural topology optimization problems in two and three-dimensional continuous, which describe the chemotactic strategy as a simulated process for removing material from a structure. A chemotaxis-based regularization numerical scheme was employed for common checkerboards and mesh dependence issues. The algorithm minimizes compliance and maximizes stiffness, so it is applied to various configurations of beams to show its efficiency, performance, and versatility. Then, the algorithm is evaluated to determine its effectiveness and computational performance. Results are compared with the Sequential Element Rejection and Admission (SERA) method and the Soft Bidirectional Evolutionary Structural Optimization (Soft BESO) method using several performance metrics. The results showed that BCBTOA possessed a better computational performance on some benchmark problems and showed layouts with entirely clear gray areas.