Misusing bad and badly is a common grammatical mistake. The word bad is an adjective and should be used to modify nouns and pronouns. Badly, like most words ending in -ly, is an adverb and is used to modify verbs. The thing that trips most people up is that linking verbs such as to be and to feel take adjectives rather than adverbs.
Why do people use bad and badly incorrectly so often in their writing? The simple answer is that we hear them misused frequently in casual talk. The good news is you can easily determine which to use in your writing by looking at the function of the word bad/badly is describing.
Bad vs. badly examples
Let’s say, for example, your friend Amanda has just taken a test and you find out that she has not done well on it. The test is something she has done, and to do is an action verb. So it would be appropriate to use an adverb ending in -ly to describe how she has done . . . and unfortunately for Amanda, it is badly.
What would this sentence sound like if bad were used instead?
That expression might occur in casual speech sometimes, but it has no place in good writing.
The tricky part is that if we word our sentence about Amanda’s test experience just a little differently, bad actually can become the correct word to use.
In this sentence, bad is used because it is an adjective modifying the noun test. If a noun—a person, place, or thing—is what is being described as “not good,” we use the word bad.
If you rewrote these sentences so that verbs were being modified (describing how the verbs were being done), we would use badly instead.
An exception: Linking verbs
Other linking verbs are sense verbs such as feel, seem, look, appear, smell, taste, and sound.
The only circumstance under which the second sentence could be deemed correct is an unlikely one: My dog, due to some kind of infirmity or injury, has a reduced ability to smell.
Again, it is far more likely that what you want to express is the negative emotional or physical state you are in (I feel bad). It is possible, but unlikely, that you are trying to describe that you aren’t very successful at reaching out and feeling the things around you (I feel badly).