The invention discloses a priority-based data transmission method and a device. The method comprises the following steps: an ED (edge device) acquires priority, bandwidth and MAC address corresponding to other EDs connected with servers; ED records the corresponding relations among the MAC address, the priority and the bandwidth in a priority information table, and records the used bandwidth in the corresponding relations as a designated value; ED acquires the target MAC address of data, and acquires the corresponding priority, the bandwidth and the used bandwidth according to the target MAC address matched with the MAC address recorded in the priority information table; and when the acquired used bandwidth is smaller than the acquired bandwidth, ED sets the priority as the acquired priority in an IP message header packaging the data, and transmits the packaged data. In the embodiment of the invention, the flow of an important server can be forwarded in time.