A three-dimensional shaping device comprising: a first nozzle that discharges a shaping material from a discharge port formed on a tip end surface ; a stage that includes a stacking surface on which the shaping material is stacked; a first drive unit that changes a relative position between the first nozzle and the stage; a distance measurement mechanism that is disposed at a position facing the first nozzle; a cleaning mechanism that cleans the tip end surface of the first nozzle; and a shaping control unit that controls the first drive unit while discharging the shaping material from the first nozzle towards the stacking surface so as to shape a three-dimensional shaped object, wherein the shaping control unit controls the cleaning mechanism to clean the tip end surface of the first nozzle and thereafter controls the distance measurement mechanism to measure a first value relating to a distance between the tip end surface of the first nozzle and the stacking surface, and controls the first drive unit based on the first value to adjust the distance between the stacking surface and the tip end surface of the first nozzle to a predetermined distance to shape the three-dimensional shaped object, the distance measurement mechanism includes a gauge head that is disposed at a position facing the first nozzle, and a gauge head moving mechanism that moves the gauge head, and the shaping control unit controls the gauge head moving mechanism to bring the gauge head into contact with the tip end surface of the first nozzle to measure the first value based on a movement amount of the gauge head. a first nozzle that discharges a shaping material from a discharge port formed on a tip end surface ; a stage that includes a stacking surface on which the shaping material is stacked; a first drive unit that changes a relative position between the first nozzle and the stage; a distance measurement mechanism that is disposed at a position facing the first nozzle; a cleaning mechanism that cleans the tip end surface of the first nozzle; and a shaping control unit that controls the first drive unit while discharging the shaping material from the first nozzle towards the stacking surface so as to shape a three-dimensional shaped object, wherein the shaping control unit controls the cleaning mechanism to clean the tip end surface of the first nozzle and thereafter controls the distance measurement mechanism to measure a first value relating to a distance between the tip end surface of the first nozzle and the stacking surface, and controls the first drive unit based on the first value to adjust the distance between the stacking surface and the tip end surface of the first nozzle to a predetermined distance to shape the three-dimensional shaped object, controls the cleaning mechanism to clean the tip end surface of the first nozzle and thereafter controls the distance measurement mechanism to measure a first value relating to a distance between the tip end surface of the first nozzle and the stacking surface, and controls the first drive unit based on the first value to adjust the distance between the stacking surface and the tip end surface of the first nozzle to a predetermined distance to shape the three-dimensional shaped object, the distance measurement mechanism includes a gauge head that is disposed at a position facing the first nozzle, and a gauge head moving mechanism that moves the gauge head, and a gauge head that is disposed at a position facing the first nozzle, and a gauge head moving mechanism that moves the gauge head, and the shaping control unit controls the gauge head moving mechanism to bring the gauge head into contact with the tip end surface of the first nozzle to measure the first value based on a movement amount of the gauge head. <EOS>