A method for cooling a compressor motor (170) and a cooling circuit utilizing refrigerant that originates in the condenser (30) to cool a motor (170) and electromagnetic bearings (196, 206). The motor drives a compressor (20), while the electromagnetic bearings support the motor rotor (178) during operation of the compressor. Liquid refrigerant from the condenser is expanded into a two-phase mixture, passed over the stator, expanded a second time, passed over the bearings and between the stator and rotor, before being returned to an evaporator (50).