The present invention relates to a novel heterocycle derivative, a salt thereof, or an isomer thereof. More specifically, the present invention relates to a novel heterocycle derivative effective for the therapy for hair loss such as androgenic alopecia and alopecia areata and having an excellent preventive effect of hair loss, a salt or isomer thereof, and a composition comprising same as an effective ingredient for prevention of hair loss.