The present work deals with topology optimization for obtaining a desired energy absorption history of a crushed structure. The optimized energy absorbing structures are used to improve the crashworthiness of transportation vehicles. The ground structure consists of rectangular 2D-beam elements with plastic hinges. The elements can undergo large rotations, so the analysis accommodates geometric nonlinearities. A quasi-static nonlinear finite element solution is obtained with an implicit backward Euler algorithm, and the analytical sensitivities are computed by the direct differentiation method.