in a dirty or unclean manner; in a way that involves or produces dirt or filth.
From the adjective 'dirty' plus the adverb-forming suffix '-ly.' This suffix converts adjectives into adverbs to describe how an action is performed, a pattern that has been productive in English for over 1,000 years.
The word 'dirtily' is one of those adverbs that's technically correct but sounds awkward—'in a dirty way' might sound more natural to modern ears, showing how English speakers gradually prefer some adverbs over others even when both are grammatically valid.
Complete word intelligence in one call. Free tier — 50 lookups/day.