Hydrazones are a group of compounds possessing diversified biological activity, anti-inflammatory and analgesic activities. There are also known xanthine derivatives possessing such activity. The aim of our study was to investigate if introduction of hydrazone moiety to 3,7-dimethylpurine-2,6-dion-1-yl acetic and butanoic acid derivatives would enhance the analgesic activity. The designed series of compounds were synthesized in a multi-step procedure. Their pharmacological activity was investigated in the writhing syndrome test. Based on the results the structure-activity relationship was discussed. From the synthesized group of twenty compounds, nineteen were tested in vivo. The analgesic activity of most compounds, except for compound 4, was higher than for acetylsalicylic acid in the writhing syndrome test. Our study showed that the introduction of hydrazone moiety generally enhances analgesic activity of xanthine derivatives, compared to derivatives with free carboxylic group, ester, benzylamide and hydrazide moieties. The presence of hydroxyl moiety or substituent with high electron density does not seem to be necessary for the activity of hydrazone derivatives.