'Swearing' is a vague, informal term. I don't think you can do it in 2 words, but it would be better if you presented the contextual sentence. As it stands, I suggest 'literary profanity'.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.