In this study, a nonlinear robust state feedback based on H-infinity controller for nonlinear systems is constructed. On the basis of a proposed cost function, the black hole optimization (BHO) method is employed as a successful optimization approach to discover the optimum parameters with relation to the proposed controller. Solving the H-infinity algebraic Riccati equation yields the recommended controller gain matrix. To demonstrate the efficacy of the suggested controller, two categories of nonlinear systems are provided as case studies. Lastly, the simulation findings reveal that the proposed nonlinear controller is capable and enhances the performance and stability of the nonlinear systems.