A solenoid valve that extends in an axial direction (Ld), a width direction (Wd) orthogonal to the axial direction, and an up-down direction (Hd) orthogonal to the axial direction and that has a first end and a second end positioned opposite to each other in the axial direction, the solenoid valve comprising: a valve body having multiple ports (P1-P3) formed inside and also having a valve plug disposed inside so as to be able to move in the axial direction (Ld) and switch a communication state among the ports; a valve actuation unit that includes a solenoid portion and that is connected to an end portion of the valve body near the second end and configured to move the valve plug by moving a movable iron core in the axial direction (Ld) due to magnetic excitation of the solenoid portion; and a closed-end magnetic cover having an opening at an end thereof near the first end, wherein the solenoid valve is formed by inserting the solenoid portion into the magnetic cover from the opening and by joining the valve body and the magnetic cover to each other, the magnetic cover is formed into a box having the opening by bending a magnetic metal sheet and has first and second sidewalls (32, 33) that extend in the axial direction (Ld) and oppose each other in the width direction (Wd), a bonnet wall that integrally connects edges of the first and second sidewalls (32, 33) near the second end, a top wall formed in such a manner that a first and a second bent portion (36, 37) extending from respective axially extending upper edges of the first and second sidewalls (32, 33) are bent toward a space between the first and second sidewalls, and a bottom wall formed between axially extending lower edges of the first and second sidewalls (32, 33) so as to oppose the top wall in the up-down direction (Hd), the valve body and the magnetic cover are joined to each other by engagement between locking protrusions (15a, 15b) and engagement holes that are formed at a pair of side surfaces (12a, 12b) of the valve body and at the first and second sidewalls (32, 33) of the magnetic cover, and characterized in that the solenoid valve further includes a first fastening member that fastens the first and second bent portions (36, 37) to each other in the width direction (Wd) and a second fastening member that fastens the first fastening member and the valve body to each other in the axial direction (Ld). a valve body having multiple ports (P1-P3) formed inside and also having a valve plug disposed inside so as to be able to move in the axial direction (Ld) and switch a communication state among the ports; a valve actuation unit that includes a solenoid portion and that is connected to an end portion of the valve body near the second end and configured to move the valve plug by moving a movable iron core in the axial direction (Ld) due to magnetic excitation of the solenoid portion; and a closed-end magnetic cover having an opening at an end thereof near the first end, wherein the solenoid valve is formed by inserting the solenoid portion into the magnetic cover from the opening and by joining the valve body and the magnetic cover to each other, the magnetic cover is formed into a box having the opening by bending a magnetic metal sheet and has first and second sidewalls (32, 33) that extend in the axial direction (Ld) and oppose each other in the width direction (Wd), a bonnet wall that integrally connects edges of the first and second sidewalls (32, 33) near the second end, a top wall formed in such a manner that a first and a second bent portion (36, 37) extending from respective axially extending upper edges of the first and second sidewalls (32, 33) are bent toward a space between the first and second sidewalls, and a bottom wall formed between axially extending lower edges of the first and second sidewalls (32, 33) so as to oppose the top wall in the up-down direction (Hd), the valve body and the magnetic cover are joined to each other by engagement between locking protrusions (15a, 15b) and engagement holes that are formed at a pair of side surfaces (12a, 12b) of the valve body and at the first and second sidewalls (32, 33) of the magnetic cover, and characterized in that the solenoid valve further includes a first fastening member that fastens the first and second bent portions (36, 37) to each other in the width direction (Wd) and a second fastening member that fastens the first fastening member and the valve body to each other in the axial direction (Ld). a first fastening member that fastens the first and second bent portions (36, 37) to each other in the width direction (Wd) and a second fastening member that fastens the first fastening member and the valve body to each other in the axial direction (Ld).