A 3,4-dihydroisoquinoline derivative compound of formula (I) or a non-toxic salt thereof and a pharmaceutical agent comprising it as active ingredient (wherein all symbols have the same meaning as described in the specification). The compound of formula (I) has agonizing activity on CB2 receptor and therefore it is useful for the prophilaxis and/or treatment of various diseases such as asthma, nasal allergy, atopic dermatitis, autoimmune diseases, rheumatoid arthritis, immune dysfunction, postoperative pain, carcinomatous pain, etc.