The invention discloses a dynamic programming based look-ahead and heuristic satellite task programming algorithm. As for a certain time of look-ahead operation, the current programming task is assumed to be t[i], the current programming time is s[0], the solving target is to find out an optimal task programming solution from a task set {t, L, t<i+m-1>, L, t<i+k-1>} by taking the sum of priority as an evaluation index, then the t is judged to be in the solution or not, and a problem of accepting or rejecting of the t is judged sequentially. First of all, M (m, s) represents the sum of the priority of the optimal programming solution in a task set {t<i+m-1>, L, t<i+k-1>} by taking s[0]+s-1 as the start programming time, wherein 1<=m<=k, 1<=s<=e[i+k-1]-s[0]+1, and m and s are both positive integers, thereby transforming the solving target into solving M (1, 1) and a corresponding programming solution. The dynamic programming based look-ahead heuristic satellite task programming algorithm disclosed by the invention has the advantages of efficiency and accuracy.