Heterogeneous computing environments have been widely used in real-time embedded systems. Efficient task scheduling is essential for achieving high performance in the synthesis of embedded systems. The problem has been proved to be NP-complete and mainly heuristic algorithms which often have room for improvement exist. In this paper, an algorithm called the dynamic BLevel first (DBLF) has been presented. The DBLF algorithm selects the ready task with a maximum Blevel (ni) at each step and assigns the selected task to a processor in an insertion mode. The task is assigned to the suitable processor that satisfies the precedence sequence and has the minimum earliest-finish-time (EFT) of the task. When the EFT costs are equal, the task is firstly assigned to the processor which has the least utilization. Comparied with the related work, the result shows that the DBLF algorithm significantly surpasses the previous approaches in scheduling length.