We provide a general method for efficiently simulating time-dependent Hamiltonian dynamics on a circuit-model-based quantum computer. Our approach is based on approximating the truncated Dyson series of the evolution operator, extending the earlier proposal by Berry et al. [Phys. Rev. Lett. 114, 090502 (2015)PRLTAO0031-900710.1103/PhysRevLett.114.090502] to evolution generated by explicitly time-dependent Hamiltonians. Two alternative strategies are proposed to implement time ordering while exploiting the superposition principle for sampling the Hamiltonian at different times. The resource cost of our simulation algorithm retains the optimal logarithmic dependence on the inverse of the desired precision.