The invention provides a method for allocating transport-multiprotocol label switching and ring network protecting maintenance entity groups, which comprises the following steps: establishing a tunnel protecting group, and determining a working tunnel and a protecting tunnel of the tunnel protecting group, and an address of a next hop of the tunnel protecting group; and selecting a multiplex section protecting group to which the tunnel protecting group belongs, obtaining addresses of a next hop of a multiplex section of the multiplex section protecting group in two directions, comparing the addresses of the next hop of the multiplex section in the two directions and the address of the next hop of the tunnel protecting group, and if the address of the next hop of the multiplex section in one direction is the same as the address of the next hop of the tunnel protecting group, allocating maintenance entity groups corresponding to the multiplex section in the direction as working maintenance entity groups, and maintenance entity groups corresponding to the multiplex section in the other direction as protecting maintenance entity groups. The invention also provides a device for allocating transport-multiprotocol label switching and ring network protecting maintenance entity groups. When allocating the tunnel protecting group, the method and the device have simple input data and high allocation accuracy.