Abstract The krill herd (KH) algorithm is widely used for optimizing truss structures as no gradient information is necessary, and only a few parameters require adjustment. However, when the truss structure becomes discrete and complex, KH tends to fall into a local optimum. Therefore, a novel target-oriented KH (TOKH) algorithm is proposed in this study to optimize the design of discrete truss structures. Initially, a crossover operator is established between the “best krill” and “suboptimal krill” to generate a robust “cross krill” for global exploration. Additionally, an improved local mutation and crossover (ILMC) operator is introduced to fine-tune the “center of food” and candidate solutions for local exploitation. The proposed method and other optimization approaches are experimentally compared considering 15 benchmark functions. Then, the performance of the TOKH algorithm is evaluated based on four discrete truss structure optimization problems under multiple loading conditions. The obtained optimization results indicate that the proposed method presents competitive solutions in terms of accuracy, unlike other algorithms in the literature, and avoids falling into a local minimum.