 "Dirrty" is a hip hop and R & B song. Composed in the key of G minor, it has a moderately fast tempo of 100 beats per minute. The lines in the refrain and Redman's rapping verses are emphasized by a pair of B ♭ octave dyads. Aguilera's vocal range on the track spans F3 to D5. Redman's original ape-like sounds from "Let's Get Dirty" are also featured on "Dirrty". According to Stylus Magazine's Todd Burns, the song features a bassline which "doesn't quite mesh with the song in a natural way" and an "effective" overdubbing technique. The song's lyrics detail sexual activities such as table dancing. Jon Pareles noted that Aguilera was determined to shed her teen pop image that she achieved with her early works, and decided to show her sexuality and aggression in the "self-explanatory" "Dirrty". Writing for The Guardian, Betty Clarke described the song's lyrics as "majestically filthy." A sequel to the song entitled "Still Dirrty" was recorded by Aguilera for her 2006 album Back to Basics.
