The invention discloses a low-energy EDF (earliest deadline first) real-time task scheduling method for a mixed main memory embedded system. With the adoption of advantages that a PCM (phase-change memory) is non-volatile, low in energy and high in performance and in combination of a dynamic EDF algorithm, real-time constraint of the whole task set is guaranteed, accordingly, power consumption of the whole system is reduced, and the real-time constraint of tasks is not influenced. The method comprises the steps as follows: 1), tasks in the task set T are arranged according to a (Wpi-Wdi)Nwi descending order; 2), all the tasks are initialized; 3), the tasks are placed in the PCM one by one according to a task sequence of the task set T, if the task set still can be scheduled, the task is marked as P-task, Ci is equal to Wpi, and operation is performed until all the tasks in the task set T are checked; 4), the system starts to execute the tasks; 5), free time which is assigned to all the tasks with the dynamic EDF algorithm is calculated; 6), the free time is assigned with the dynamic EDF algorithm according to priority; and 7), the step 6 is repeated until the whole task set T is finished.