An overflow and exhaust assembly (100) of a washing machine and a wall-mounted washing machine having the overflow and exhaust assembly. The overflow and exhaust assembly (100) of a washing machine comprises an overflow pipe (10) and an exhaust assembly (20). One end of the overflow pipe (10) is suitable for connecting to a rear outer tub (400) of the washing machine and the other end communicates with the outside to discharge water or foam; the exhaust assembly (20) has a bent structure, one side of the exhaust assembly (20) is connected to the overflow pipe (10), and the bent structure is not lower than the joint of the exhaust assembly (20) and the overflow pipe (10) in a vertical direction. The overflow and exhaust assembly overcomes the defect that the existing washing machine has weak foam removal capability, and is used for preventing foam in the tub of the washing machine from overflowing the washing machine to pollute a wall.