A motor device comprising: a motor; a first substrate on which a first element group is provided; a second substrate on which a second element group is provided, the second element group having a heat generation amount larger than a heat generation amount of the first element group, the second substrate being placed to face the first substrate in a plate-thickness direction of the second substrate; a first heat sink placed between the first substrate and the second substrate, the first heat sink being configured to promote heat dissipation from the first element group and the second element group; a second heat sink placed on an opposite side of the second substrate from the first heat sink, the second heat sink being configured to promote heat dissipation from the second element group, and a motor housing in which the motor is accommodated, the motor housing being bottomed tubular, wherein the first heat sink is fixed to the motor housing, the first heat sink is configured to make thermal contact with the motor housing via a fixed part of the first heat sink to the motor housing, the first heat sink includes a body portion facing the first substrate and the second substrate, the first heat sink includes a housing portion connected to the body portion, the housing portion being configured to surround a periphery of the body portion and exposed to outside the motor device, the second heat sink closes the opening of the motor housing and is fixed to an inner wall surface of the motor housing, and the second heat sink is configured to make thermal contact with the motor housing via a fixed part of the second heat sink to the motor housing. a motor; a first substrate on which a first element group is provided; a second substrate on which a second element group is provided, the second element group having a heat generation amount larger than a heat generation amount of the first element group, the second substrate being placed to face the first substrate in a plate-thickness direction of the second substrate; a first heat sink placed between the first substrate and the second substrate, the first heat sink being configured to promote heat dissipation from the first element group and the second element group; a second heat sink placed on an opposite side of the second substrate from the first heat sink, the second heat sink being configured to promote heat dissipation from the second element group, and a motor housing in which the motor is accommodated, the motor housing being bottomed tubular, wherein the first heat sink is fixed to the motor housing, the first heat sink is configured to make thermal contact with the motor housing via a fixed part of the first heat sink to the motor housing, the first heat sink includes a body portion facing the first substrate and the second substrate, the first heat sink includes a housing portion connected to the body portion, the housing portion being configured to surround a periphery of the body portion and exposed to outside the motor device, the second heat sink closes the opening of the motor housing and is fixed to an inner wall surface of the motor housing, and the second heat sink is configured to make thermal contact with the motor housing via a fixed part of the second heat sink to the motor housing.