One of the operations difficult for robots is manipulation of deformable objects, and this topic has been studied extensively in the literature. In daily life, there are situations in which one is required to tie deformable band-shaped objects, such as neckties and ribbons, but studies on the knotting of such objects have not been reported. Therefore, we select headband as an example of deformable band-shaped objects and study methods to manipulate the headband without twisting and to conduct the operation in such a way that the band does not loosen after tying. The robot performs the untwisting operation by handling the headband in such a way that it does not twist. The trajectory of both hands is calculated considering the object to prevent the headband from loosening after it is tied. In an experiment, we demonstrate that the robot can deal with a headband that is twisted extremely by repetition of the untwisting operation. Moreover, we demonstrate that the headband is tightened adequately after it is tied.