A motor operated valve comprising: a body; a valve element that is moved toward and away from a valve hole formed in the body to close and open a valve section; a rotor for driving the valve element in opening/closing directions of the valve section; a can that is a bottomed cylindrical member fixed to the body and containing the rotor, and that defines an internal space in which fluid pressure acts and an external space in which fluid pressure does not act; and a stator unit including a case (400, 500, 600, 700) having a cylindrical shape and made of resin, a stator mounted in the case (400, 500, 600, 700) and coaxially around the can, a circuit board mounted in the case (400, 500, 600, 700), a power supply terminal connected with the circuit board, a connector part made of resin and integrally including the power supply terminal therein, and a cap member, the cap member and the case (400, 500, 600, 700) forming a space containing the circuit board, the can bottom being located in the space, wherein the connector part has a leak hole that permits leakage of pressure in the space containing the circuit board to outside and wherein the connector part is formed integrally with the case (400, 500, 600, 700) by molding resin, a first seal portion (460, 560, 660, 760) is provided between a first open end portion (403, 523, 623, 703) of the case (400, 500, 600, 700) and the cap member, and a second seal portion is provided between a second open end portion (410, 530, 630, 710) of the case (400, 500, 600, 700) and the body, the second seal portion being a seal ring, the seal ring is between an inner circumferential face of the case (400, 500, 600, 700) and an outer circumferential face of the body, an open end portion of the can is located further inside the case (400, 500, 600, 700) than the seal ring, a position of the can fixed to the body is farther from an open end of the second open end portion (410, 530, 630, 710) of the case (400, 500, 600, 700) in an axial direction than the seal ring. a body; a valve element that is moved toward and away from a valve hole formed in the body to close and open a valve section; a rotor for driving the valve element in opening/closing directions of the valve section; a can that is a bottomed cylindrical member fixed to the body and containing the rotor, and that defines an internal space in which fluid pressure acts and an external space in which fluid pressure does not act; and a stator unit including a case (400, 500, 600, 700) having a cylindrical shape and made of resin, a stator mounted in the case (400, 500, 600, 700) and coaxially around the can, a circuit board mounted in the case (400, 500, 600, 700), a power supply terminal connected with the circuit board, a connector part made of resin and integrally including the power supply terminal therein, and a cap member, the cap member and the case (400, 500, 600, 700) forming a space containing the circuit board, the can bottom being located in the space, wherein the connector part has a leak hole that permits leakage of pressure in the space containing the circuit board to outside and wherein the connector part is formed integrally with the case (400, 500, 600, 700) by molding resin, a first seal portion (460, 560, 660, 760) is provided between a first open end portion (403, 523, 623, 703) of the case (400, 500, 600, 700) and the cap member, and a second seal portion is provided between a second open end portion (410, 530, 630, 710) of the case (400, 500, 600, 700) and the body, the second seal portion being a seal ring, the seal ring is between an inner circumferential face of the case (400, 500, 600, 700) and an outer circumferential face of the body, an open end portion of the can is located further inside the case (400, 500, 600, 700) than the seal ring, a position of the can fixed to the body is farther from an open end of the second open end portion (410, 530, 630, 710) of the case (400, 500, 600, 700) in an axial direction than the seal ring.