Abstract: A structure and method for holding an electric wire connected to the inside of an electric compressor incorporating a motor. The structure has a holding member for holding an electric wire present between a connection terminal section for connection to the outside and a built-in electric device. The structure and method can reliably eliminate possibility of adverse affection to an input electric wire caused by vibration, etc. while preventing a reduction in efficiency of assembly work and an increase in size of the compressor.