An insulation resistance detection circuit, comprising a controller, an inverter circuit, a first direct current voltage source, a second direct current voltage source, a filter circuit, and a switch circuit, wherein the inverter circuit comprises a positive input terminal, a negative input terminal, and N alternating current output terminals; the filter circuit comprises N input terminals and N output terminals; the switch circuit comprises N input terminals, N output terminals, M relays, and at least one impedor; each relay comprises N relay switches, an input terminal of an i th relay switch of a first relay is used as an i th input terminal of the switch circuit, and an output terminal of an i th relay switch of an M th relay is used as an i th output terminal of the switch circuit; when the quantity M is greater than 1, i th relay switches of the relays are sequentially connected in series; N is an integer greater than 1, M is an integer greater than or equal to 1, i is an integer greater than or equal to 1 and less than or equal to N, and j is an integer greater than or equal to 1 and less than or equal to M; a positive electrode of the first direct current voltage source is connected to the positive input terminal of the inverter circuit, a negative electrode of the first direct current voltage source is connected to a positive electrode of the second direct current voltage source, and a negative electrode of the second direct current voltage source is connected to the negative input terminal of the inverter circuit; an i th alternating current output terminal of the inverter circuit is connected to an i th input terminal of the filter circuit, an i th output terminal of the filter circuit is connected to the i th input terminal of the switch circuit, and the i th output terminal of the switch circuit is connected to an i th terminal of an alternating current power grid; at least one relay switch in the switch circuit is connected to the at least one impedor in parallel; and the controller is configured to: open a first relay, and close second relays, or switch an on/off status of at least one of the second relays; determine, based on a first measurement value between the positive input terminal of the inverter circuit and an earthing point, whether the positive input terminal of the inverter circuit is short-circuited to protecting earthing or has low resistance to protecting earthing; and determine, based on a second measurement value between the negative input terminal of the inverter circuit and the earthing point, whether the negative input terminal of the inverter circuit is short-circuited to protecting earthing or has low resistance to protecting earthing, wherein the first relay is a relay in the M relays that is connected to the at least one impedor in parallel, and the second relays are relays other than the first relay in the M relays. the inverter circuit comprises a positive input terminal, a negative input terminal, and N alternating current output terminals; the filter circuit comprises N input terminals and N output terminals; the switch circuit comprises N input terminals, N output terminals, M relays, and at least one impedor; each relay comprises N relay switches, an input terminal of an i th relay switch of a first relay is used as an i th input terminal of the switch circuit, and an output terminal of an i th relay switch of an M th relay is used as an i th output terminal of the switch circuit; when the quantity M is greater than 1, i th relay switches of the relays are sequentially connected in series; N is an integer greater than 1, M is an integer greater than or equal to 1, i is an integer greater than or equal to 1 and less than or equal to N, and j is an integer greater than or equal to 1 and less than or equal to M; a positive electrode of the first direct current voltage source is connected to the positive input terminal of the inverter circuit, a negative electrode of the first direct current voltage source is connected to a positive electrode of the second direct current voltage source, and a negative electrode of the second direct current voltage source is connected to the negative input terminal of the inverter circuit; an i th alternating current output terminal of the inverter circuit is connected to an i th input terminal of the filter circuit, an i th output terminal of the filter circuit is connected to the i th input terminal of the switch circuit, and the i th output terminal of the switch circuit is connected to an i th terminal of an alternating current power grid; at least one relay switch in the switch circuit is connected to the at least one impedor in parallel; and the controller is configured to: open a first relay, and close second relays, or switch an on/off status of at least one of the second relays; determine, based on a first measurement value between the positive input terminal of the inverter circuit and an earthing point, whether the positive input terminal of the inverter circuit is short-circuited to protecting earthing or has low resistance to protecting earthing; and determine, based on a second measurement value between the negative input terminal of the inverter circuit and the earthing point, whether the negative input terminal of the inverter circuit is short-circuited to protecting earthing or has low resistance to protecting earthing, wherein the first relay is a relay in the M relays that is connected to the at least one impedor in parallel, and the second relays are relays other than the first relay in the M relays.