PROBLEM TO BE SOLVED: To provide a device and method that can prevent troubles such as patients blood loss during dialysis session and inability to replace fluid by detecting a reverse-attached replacement fluid line and its reverse mounting to a solution sending pump before hemodialysis.SOLUTION: A hemodialysis apparatus includes the replacement fluid line, the solution sending pump to send fluid contained in the replacement fluid line, and a bubble detector to detect gas in the replacement fluid line, wherein the bubble detector is mounted near the connection end on the dialysate line side of the replacement fluid line. By driving the solution sending pump, fluid flowing out from the dialysate line or a blood circuit is sent into the replacement fluid line not filled with fluid, and the time (time lag) for the gas not to be detected is measured with the bubble detector, thereby detecting the reverse attachment of a replacement fluid line and its reverse mounting to the solution sending pump of the replacement line, and preventing an incorrect operation.