An automatic working system includes a self-moving device moving and working inside a defined working area and an energy module supplying power to the self-moving device. The self-moving device includes a body, a movement module, a task execution module, and a control module. The energy module is selectively configured to supply power to the self-moving device or another electric tool different from the self-moving device. The self-moving device includes an accommodating cavity provided with an inlet and configured to accommodate the energy module and a protective cover configured to operably block the inlet. The self-moving device further includes a drainage system configured to drain water to prevent water from entering the accommodating cavity.