A temperature sensor configured to detect presence and temperature of a measurement object, the temperature sensor comprising: a sensor unit configured to detect the temperature of the measurement object, the sensor unit including a heat-sensitive body and a pair of electrical wires (13,30) connected with the heat-sensitive body, each electrical wire including a lead wire directly connected with the heat-sensitive body and a connecting wire indirectly connected with the heat-sensitive body through the lead wire; a holding unit configured to hold the sensor unit in a movable manner; and a detection unit configured to detect the presence of the measurement object in response to the movement of the sensor unit, wherein the detection unit includes a first member configured to move in response to the movement of the sensor unit; the holding unit includes a second member configured to restrict the movement of the first member and hold the first member such that the first member moves in a predetermined direction in response to the movement of the sensor unit; and the first member and the second member are different in hardness, wherein the second member is a protective pipe comprising a non-magnetic body and containing the connecting wires in an interior, and the first member is a magnetic shield attached to the connecting wires and configured to be capable of moving in an interior of the protective pipe, characterized in that the magnetic shield includes: a shield part surrounding a periphery of the connecting wires such that there is play, a holder holding the connecting wires, and a connection piece connecting the shield part and the holder, wherein the holder is disposed on an opposite side of the heat-sensitive body with respect to the shield part, wherein the connection piece is inclined toward axis lines of the shield part and the holder such that the axis lines of the shield part and the holder coincide, and wherein the holder is swaged to be formed in a nearly cylindrical shape and to fix the magnetic shield to the connecting wires so as to be able to move with the movement of the connecting wires. a sensor unit configured to detect the temperature of the measurement object, the sensor unit including a heat-sensitive body and a pair of electrical wires (13,30) connected with the heat-sensitive body, each electrical wire including a lead wire directly connected with the heat-sensitive body and a connecting wire indirectly connected with the heat-sensitive body through the lead wire; a holding unit configured to hold the sensor unit in a movable manner; and a detection unit configured to detect the presence of the measurement object in response to the movement of the sensor unit, wherein the detection unit includes a first member configured to move in response to the movement of the sensor unit; the holding unit includes a second member configured to restrict the movement of the first member and hold the first member such that the first member moves in a predetermined direction in response to the movement of the sensor unit; and the first member and the second member are different in hardness, wherein the second member is a protective pipe comprising a non-magnetic body and containing the connecting wires in an interior, and the first member is a magnetic shield attached to the connecting wires and configured to be capable of moving in an interior of the protective pipe, characterized in that the magnetic shield includes: a shield part surrounding a periphery of the connecting wires such that there is play, a holder holding the connecting wires, and a connection piece connecting the shield part and the holder, wherein the holder is disposed on an opposite side of the heat-sensitive body with respect to the shield part, wherein the connection piece is inclined toward axis lines of the shield part and the holder such that the axis lines of the shield part and the holder coincide, and wherein the holder is swaged to be formed in a nearly cylindrical shape and to fix the magnetic shield to the connecting wires so as to be able to move with the movement of the connecting wires. a shield part surrounding a periphery of the connecting wires such that there is play, a holder holding the connecting wires, and a connection piece connecting the shield part and the holder, wherein the holder is disposed on an opposite side of the heat-sensitive body with respect to the shield part, wherein the connection piece is inclined toward axis lines of the shield part and the holder such that the axis lines of the shield part and the holder coincide, and wherein the holder is swaged to be formed in a nearly cylindrical shape and to fix the magnetic shield to the connecting wires so as to be able to move with the movement of the connecting wires.