In accordance with an embodiment of the present invention, a washing machine may be provided to be able to automatically add a liquid detergent into a tub. The washing machine in accordance with an embodiment of the present invention includes a detergent box for containing a detergent or rinse; a detergent supply pump for pumping the detergent or rinse contained in the detergent box; a connection pipe connected to the detergent supply pump and a tub; and an open/close unit for opening or closing the connection pipe, wherein the open/close unit is configured to open the connection pipe only when the detergent or rinse is pumped by the detergent supply pump.