The present invention provides a therapeutic or prophylactic drug for dementia, said drug containing a xanthine oxidase inhibitor such as a compound represented by formula (I), (II), (III) or (IV), or a pharmaceutically acceptable salt thereof, as an active ingredient.本發明提供含有式(I)、(II)、(III)或(IV)表示之化合物或該等之醫藥上容許之鹽等之黃嘌呤氧化酶抑制藥作為有效成分的失智症之治療藥或預防藥。