A path planning of rolling Q-learning algorithm based on the prior knowledge in the unknown environment is proposed. The prior knowledge about the environment is added as heuristic information of Q learning to initialize the value, so as to avoid the blindness of early-stage learning and improve rate of convergence. Besides, the method of rolling learning is used for solving the problems of limited visual domain of the robot as well as dimensionality disaster caused by the increase in state space of Q-learning in a large scale environment. The simulation results show that, the robot can not only avoid collision safely, but also find out an optimal path by using the algorithm in the unknown environment, and the results obtained are satisfactory.