Disclosed are carbazole derivatives and pharmaceutically acceptable salts thereof that act on the 5-HT
7
receptor. The carbazole derivatives and the pharmaceutically acceptable salts thereof have high binding affinities for the 5-HT
7
serotonin receptor and antagonistic activities against the 5-HT
7
serotonin receptor. Further disclosed are pharmaceutical compositions including the compounds as active ingredients. The pharmaceutical compositions are useful as therapeutic and prophylactic agents for central nervous system diseases where antagonistic activities against 5-HT
7
are required, such as depression, migraine, anxiety, pain, inflammatory pain, neuropathic pain, body temperature dysregulation, circadian rhythm dysregulation, sleep disturbance, and smooth muscle-related diseases.