To provide an excellent agent for preventing or treating dementia and schizophrenia based on serotonin 5-HT5A receptor regulating action, it was found that a tetrahydroisoquinoline derivative characterized by a structure in which an acylguanidino group binds to a N atom of a tetrahydroisoquinoline ring or the like, and a cyclic group binds to an unsaturated ring has a potent 5-HT5A receptor regulating action and an excellent pharmacological action based on the regulating action and also discovered that the tetrahydroisoquinoline derivative is useful as an agent for treating or preventing dementia, schizophrenia, and the like, whereby the present invention has been completed.