Based on the non-equilibrium Green's function (NEGF) coupled with density function theory (DFT), namely, NEGF-DFT quantum transport theory, we propose an efficient formalism to calculate the transient current of molecular devices under a step-like pulse from first principles. By combining NEGF-DFT with the complex absorbing potential (CAP), the computational complexity of our formalism (NEGF-DFT-CAP) is proportional to O(N) where N is the number of time steps in the time-dependent transient calculation. Compared with state-of-the-art algorithm of first principles time-dependent calculation that scales with at least N 2 , this order N technique drastically reduces the computational burden making it possible to tackle realistic molecular devices. To ensure the accuracy of our method, we carry out the benchmark calculation compared with exact NEGF-TDDFT formalism and they agree well with each other. As an illustration, we investigate the transient current of molecular device Al-C 3 -Al from first principles.