A method of producing a rare-earth magnet, comprising: accommodating a sintered body, which is obtained by sintering a rare-earth magnet material, in a forming mold which is constituted by upper and lower punches (2, 3) and a die and in which at least one of the upper and lower punches is slidable in a hollow inside of the die, and producing a rare-earth magnet precursor (S') by performing first hot working in which, in two side surfaces of the sintered body, which are parallel to a pressing direction and are opposite to each other, one side surface is caused to come into contact with an inner surface of the die and is brought to a constrained state to suppress deformation, and the other side surface is not caused to come into contact with the inner surface of the die and is brought to an unconstrained state to permit deformation when upper and lower surfaces of the sintered body are pressed by using the upper and lower punches (2, 3); and moving the rare-earth magnet precursor (S') in the forming mold, and producing a rare-earth magnet by performing second hot working in which, in two side surfaces of the rare-earth magnet precursor (S'), which are parallel to the pressing direction, a side surface, which is in the unconstrained state in the first hot working, is caused to come into contact with the inner surface of the die and is brought to the constrained state to suppress deformation, and a side surface, which is in the constrained state in the first hot working, is brought to the unconstrained state to permit deformation when upper and lower surfaces of the rare-earth magnet precursor are pressed by using the upper and lower punches. accommodating a sintered body, which is obtained by sintering a rare-earth magnet material, in a forming mold which is constituted by upper and lower punches (2, 3) and a die and in which at least one of the upper and lower punches is slidable in a hollow inside of the die, and producing a rare-earth magnet precursor (S') by performing first hot working in which, in two side surfaces of the sintered body, which are parallel to a pressing direction and are opposite to each other, one side surface is caused to come into contact with an inner surface of the die and is brought to a constrained state to suppress deformation, and the other side surface is not caused to come into contact with the inner surface of the die and is brought to an unconstrained state to permit deformation when upper and lower surfaces of the sintered body are pressed by using the upper and lower punches (2, 3); and moving the rare-earth magnet precursor (S') in the forming mold, and producing a rare-earth magnet by performing second hot working in which, in two side surfaces of the rare-earth magnet precursor (S'), which are parallel to the pressing direction, a side surface, which is in the unconstrained state in the first hot working, is caused to come into contact with the inner surface of the die and is brought to the constrained state to suppress deformation, and a side surface, which is in the constrained state in the first hot working, is brought to the unconstrained state to permit deformation when upper and lower surfaces of the rare-earth magnet precursor are pressed by using the upper and lower punches.