An oscillating motor, comprising: a U-shaped magnetic yoke having a first support leg and a second support leg, and the first support leg and the second support leg are wound with coils; a control circuit electrically connected to the coils and generating alternating pulses to generate alternating magnetic poles at end faces (111, 121) of the first support leg and the second support leg of the U-shaped magnetic yoke; a swing arm swingable around a fulcrum; wherein the swing arm extends outward from the end faces (111, 121) of the U-shaped magnetic yoke and is bounded by the fulcrum; an end of the swing arm close to the U-shaped magnetic yoke is an inner arm and the other end of the swing arm remote from the U-shaped magnetic yoke is an outer arm; a second magnetic yoke mounted at one end of the inner arm close to the U-shaped magnetic yoke; and four permanent magnets (610, 620, 630, 640) being fixedly mounted on the second magnetic yoke; wherein the four permanent magnets are distributed on the same circumference centered on the fulcrum, and are orderly named as a first permanent magnet, a second permanent magnet, a third permanent magnet, and a fourth permanent magnet; radial end faces (611, 641) of the first permanent magnet and of the fourth permanent magnet have a same polarity; radial end faces (621, 631) of the second permanent magnet and of the third permanent magnet have a same polarity; the radial end faces (611, 621) of the first permanent magnet and the second permanent magnet have opposite polarities and are provided corresponding to a end face of the first support leg; the radial end faces (631, 641) of the third permanent magnet and the fourth permanent magnet have opposite polarities and are provided corresponding to a end face of the second support leg; an air gap is provided between the end faces (611,621) of the first and the second permanent magnets (610, 620) and of the first support leg or is provided between the end faces (631, 641) of the third and the fourth permanent magnets (630, 640) and of the second support leg; characterized in that a gap between the first permanent magnet and the second permanent magnet is smaller than a width of the end face of the first support leg; and a gap between the third permanent magnet and the fourth permanent magnet is smaller than a width of the end face of the second support leg. a U-shaped magnetic yoke having a first support leg and a second support leg, and the first support leg and the second support leg are wound with coils; a control circuit electrically connected to the coils and generating alternating pulses to generate alternating magnetic poles at end faces (111, 121) of the first support leg and the second support leg of the U-shaped magnetic yoke; a swing arm swingable around a fulcrum; wherein the swing arm extends outward from the end faces (111, 121) of the U-shaped magnetic yoke and is bounded by the fulcrum; an end of the swing arm close to the U-shaped magnetic yoke is an inner arm and the other end of the swing arm remote from the U-shaped magnetic yoke is an outer arm; a second magnetic yoke mounted at one end of the inner arm close to the U-shaped magnetic yoke; and four permanent magnets (610, 620, 630, 640) being fixedly mounted on the second magnetic yoke; wherein the four permanent magnets are distributed on the same circumference centered on the fulcrum, and are orderly named as a first permanent magnet, a second permanent magnet, a third permanent magnet, and a fourth permanent magnet; radial end faces (611, 641) of the first permanent magnet and of the fourth permanent magnet have a same polarity; radial end faces (621, 631) of the second permanent magnet and of the third permanent magnet have a same polarity; the radial end faces (611, 621) of the first permanent magnet and the second permanent magnet have opposite polarities and are provided corresponding to a end face of the first support leg; the radial end faces (631, 641) of the third permanent magnet and the fourth permanent magnet have opposite polarities and are provided corresponding to a end face of the second support leg; an air gap is provided between the end faces (611,621) of the first and the second permanent magnets (610, 620) and of the first support leg or is provided between the end faces (631, 641) of the third and the fourth permanent magnets (630, 640) and of the second support leg; characterized in that a gap between the first permanent magnet and the second permanent magnet is smaller than a width of the end face of the first support leg; and a gap between the third permanent magnet and the fourth permanent magnet is smaller than a width of the end face of the second support leg.