The present invention relates to a novel compound having a function of inhibiting RORγ activity. The present invention also relates to pharmaceutical composition comprising the compound, a use of the compound in treating or preventing autoimmune diseases, inflammatory diseases, metabolic diseases, or cancer diseases.