A motor-driven compressor comprising: a compression mechanism compressing and discharging refrigerant gas; an electric motor driving the compression mechanism; a compressor housing made of a metal, the compressor housing accommodating the compression mechanism and the electric motor, the compressor housing through which a hole is formed; a conductive member extending from the inside to the outside of the compressor housing through the hole; a terminal base disposed at the hole of the compressor housing; an insulating member insulating the conductive member from the terminal base; a connection terminal connected electrically to the conductive member at a terminal connection; a wire assembly having a core wire connecting electrically between the connection terminal and the electric motor and an insulator covering the core wire; and a terminal housing made of an insulating material, covering the terminal connection, and disposed in the compressor housing; a first hole is formed through the terminal housing and the conductive member is inserted through the first hole, a second hole is formed through the terminal housing and the wire assembly, a first seal member is disposed between the insulating member and the first hole, characterized in that: the wire assembly has an insulating tube which covers the insulator and is inserted through the second hole, wherein both ends (53A, 53B) of the insulating tube are opened for communication with the inside and the outside of the terminal housing through a clearance being formed between the insulating tube and the insulator, and a second seal member (54, 61) set in close contact with the terminal housing and the insulating tube, wherein the inside of the terminal housing does not communicate with the outside of the terminal housing except for through the clearance. a compression mechanism compressing and discharging refrigerant gas; an electric motor driving the compression mechanism; a compressor housing made of a metal, the compressor housing accommodating the compression mechanism and the electric motor, the compressor housing through which a hole is formed; a conductive member extending from the inside to the outside of the compressor housing through the hole; a terminal base disposed at the hole of the compressor housing; an insulating member insulating the conductive member from the terminal base; a connection terminal connected electrically to the conductive member at a terminal connection; a wire assembly having a core wire connecting electrically between the connection terminal and the electric motor and an insulator covering the core wire; and a terminal housing made of an insulating material, covering the terminal connection, and disposed in the compressor housing; a first hole is formed through the terminal housing and the conductive member is inserted through the first hole, a second hole is formed through the terminal housing and the wire assembly, a first seal member is disposed between the insulating member and the first hole, the wire assembly has an insulating tube which covers the insulator and is inserted through the second hole, wherein both ends (53A, 53B) of the insulating tube are opened for communication with the inside and the outside of the terminal housing through a clearance being formed between the insulating tube and the insulator, and a second seal member (54, 61) set in close contact with the terminal housing and the insulating tube,