An automatic control type electric toothbrush, comprising a toothbrush head and a toothbrush handle which is connected to the toothbrush head by a driving shaft, wherein the toothbrush handle is provided with an attitude sensor, a control module, and a driving mechanism, and the control module controls the driving mechanism to drive the driving shaft to rotate the toothbrush head clockwise or counterclockwise according to attitude data obtained by the attitude sensor, so that the toothbrush head is rotated in a direction from a tooth root to a dental crown; wherein a protective cover is provided at an end of the toothbrush handle corresponding to the toothbrush head, and an opening is formed on a side wall of the protective cover for bristles of the toothbrush head to protrude; and a X axis of a coordinate system of the attitude sensor is parallel to the toothbrush handle, a Y axis of the coordinate system is perpendicular to a mid-plane of the protective cover, and a Z axis of the coordinate system is perpendicular to a plane where the X and Y axes are located; wherein the attitude data includes XYZ coordinate data, and the control module performs the following processing based on the XYZ coordinate data: calculating a pitch angle and a roll angle based on the XYZ coordinate data, specifically comprising: calculating the pitch angle based on the Y coordinate data and the Z coordinate data according to the formula atan2(accY, accZ); and calculating the roll angle based on the X coordinate data, the Y coordinate data and the Z coordinate data according to the formula atan(-accX / sqrt (accY ∗ accY + accZ ∗ accZ)); and controlling rotation direction of a motor based on the pitch angle and the roll angle, specifically comprising: if the pitch angle and the roll angle are both positive or both negative, and absolute values of the pitch angle and the roll angle are both greater than a preset angle, the motor is controlled to run in a forward direction, and the motor drives the driving shaft to rotate the toothbrush head clockwise; and If one of the pitch angle and the roll angle is positive and the other is negative, and absolute values of the pitch angle and the roll angle are both greater than a preset angle, the motor is controlled to run in a reversed direction, and the motor drives the driving shaft to rotate the toothbrush head counterclockwise. calculating a pitch angle and a roll angle based on the XYZ coordinate data, specifically comprising: calculating the pitch angle based on the Y coordinate data and the Z coordinate data according to the formula atan2(accY, accZ); and calculating the roll angle based on the X coordinate data, the Y coordinate data and the Z coordinate data according to the formula atan(-accX / sqrt (accY ∗ accY + accZ ∗ accZ)); and controlling rotation direction of a motor based on the pitch angle and the roll angle, specifically comprising: if the pitch angle and the roll angle are both positive or both negative, and absolute values of the pitch angle and the roll angle are both greater than a preset angle, the motor is controlled to run in a forward direction, and the motor drives the driving shaft to rotate the toothbrush head clockwise; and If one of the pitch angle and the roll angle is positive and the other is negative, and absolute values of the pitch angle and the roll angle are both greater than a preset angle, the motor is controlled to run in a reversed direction, and the motor drives the driving shaft to rotate the toothbrush head counterclockwise.