Demand responsive transit (DRT) is expected to offer enormous possibilities for fulfilling the ever-growing diversified demand while promoting the urban sustainability. Nevertheless, it seems to remain critical but intractable to make the routing decision in response to the time-dependent travel speeds. Considering the risk of speed uncertainty, deep reinforcement learning (DRL) algorithm is presented to address the time-dependent electric DRT problem in this study. Long short-term memory (LSTM) is integrated into the attention mechanism at the decoding process. To evaluate the sustainability, the reward function can be subdivided into the number of served passengers, regret utility, and carbon emissions. To testify the effectiveness, we made a comparison between the CPLEX solver, NSGA-II, and the proposed algorithm in a realistic transportation network of Beijing. The computational results demonstrate that DRL algorithm with shorter computation time and better solutions is dramatically superior to the other approaches. Therefore, the DRL algorithm provides a more efficient framework for addressing the time-dependent electric DRT problem while improving the sustainability of the environment and society.