The present invention provides a heterocyclic compound having an IRAK-4 inhibitory action, which is useful for the prophylaxis or treatment of inflammatory disease, autoimmune disease, osteoarticular degenerative disease, neoplastic disease and the like, and a medicament containing thereof. The present invention relates to a compound represented by the formula (I): wherein each symbol is as defined in the specification, or a salt thereof.本發明提供具有IRAK-4抑制作用之雜環化合物,其係適用於預防或治療炎症、自體免疫疾病、骨關節退化性疾病、腫瘤疾病等,及含有該雜環化合物之醫藥。本發明涉及式(I)表示之化合物或其鹽:其中各符號如說明書中所定義。