A modularly connected device for cleaning a pet toilet according to the present invention includes a water inlet module and a water outlet module detachably attached so that the device may be conveniently installed in various places to automatically clean the pet toilet by sensing the feces and urine of pets. With such a modularly connected device for cleaning a pet toilet according to the present invention, the water inlet module and water outlet module are modularly connected and detached to provide convenience and simplicity of cleaning with a high capability of sensing the feces and urine of pets.