For the thin-film solar cells embedded with nanostructures at their rear dielectric layer, the shape and location of the nanostructures are crucial for higher conversion efficiency. A novel two-level hierarchical nanostructure (a sphere evenly covered with half truncated smaller spheres) can facilitate stronger intensity and wider scattering angles due to the coexistence of the merits of the nanospheres in two scales. We show in this article that the evolutionary algorithm allows for obtaining the optimal parameters of this two-scale nanostructure in terms of the maximization of the short circuit current density. In comparison with the thin-film solar cells with convex and flat metal back, whose parameters are optimized singly, the short circuit current density is improved by 7.48% and 10.23%, respectively. The exploration of such a two-level hierarchical nanostructure within an optimization framework signifies a new domain of study and allows to better identify the role of sophisticated shape in light trapping in the absorbing film, which is believed to be the main reason for the enhancement of short circuit current density.