The invention discloses an automatic switching circuit of a power supply, which comprises a first power input terminal, a second power input terminal, a switching module and an output terminal, wherein the first power input terminal adopts local direct current power supply input, one path thereof is directly connected with the output terminal, and the other path thereof is connected with a first input terminal of the switching module; the second power input terminal is connected with a second input terminal of the switching module, the output of the switching module is connected with the output terminal, and when input is conducted at the first power input terminal, the switching module does not have output. The priority of the output of the first power input terminal is higher than that of the second power input terminal; the automatic switching circuit is not limited to the switching selection between a local power supply and a POE power supply, and can be extended to similar occasions with the problem of switching selection of two paths of power supplies so as to realize automatic switching between two power supplies; and the automatic switching circuit is simple and practical, has low cost and high reliability, and also has the functions of power supply voltage electrifying buffering, overcurrent protection, anti-inversed connection protection, filtering, noise isolation and the like.