Provided is a heterocyclic compound having a superior RBP4-lowering action and useful as a medicament for the prophylaxis or treatment of a disease or symptom mediated by an increase in RBP4 or retinol supplied by RBP4. A compound represented by the formula (I):wherein each symbol is as defined in the Description, or a salt thereof has a superior RBP4-lowering action, and is useful as a medicament for the prophylaxis or treatment of a disease or symptom mediated by an increase in RBP4 or retinol supplied by RBP4.本發明提供一種雜環化合物,其具有優異之RBP4降低作用及可作為預防或治療由於RBP4或由RBP4供應之視網醇的增加所介導之疾病或症狀之藥劑用。一種由下式(I)所示之化合物或其鹽:其中各符號如說明書中所界定,具有優異之RBP4降低作用,及可作為預防或治療由於RBP4或由RBP4供應之視網醇的增加所介導之疾病或症狀之藥劑用。