The purpose of the present invention is to provide a compound or a pharmaceutically acceptable salt thereof which inhibits the activity of PI3K to regulate many biological processes including the growth, differentiation, survival, proliferation, migration, metabolism, and the like of cells and is therefore useful for the prevention/treatment of diseases including inflammatory diseases, arteriosclerosis, vascular/circulatory diseases, cancer/tumors, immune system diseases, cell proliferative diseases, infectious diseases, and the like. This was achieved by providing a substituted 2-amino-5,6-nitrogenated fused ring compound shown in the present specification, or a pharmaceutically acceptable salt thereof.