This article presents an approach for the topology optimization of frame structures composed of nonlinear Timoshenko beam finite elements (FEs) under time-varying excitation. Material nonlinearity is considered with a nonlinear Timoshenko beam FE model that accounts for distributed plasticity and axial-shear-moment interactions through appropriate hysteretic interpolation functions and a yield/capacity function, respectively. Hysteretic variables for curvature, shear, and axial deformations represent the nonlinearities and evolve according to first-order nonlinear ordinary differential equations (ODEs).Owing to the first-order representation, the governing dynamic equilibrium equations, and hysteretic evolution equations can thus be concisely presented as a combined system of first-order nonlinear ODEs that can be solved using a general ODE solver. This avoids divergence due to an ill-conditioned stiffness matrix that can commonly occur with Newmark-Newton solution schemes that rely upon linearization. The approach is illustrated for a volume minimization design problem, subject to dynamic excitation where an approximation for the maximum displacement at specified nodes is constrained to a given limit, that is, a drift ratio. The maximum displacement is approximated using the p-norm, thus facilitating the derivation of the analytical sensitivities for gradient-based optimization. The proposed approach is demonstrated through several numerical examples for the design of structural frames subjected to sinusoidal base excitation.