It came from Grace Murray Hopper's report of finding an actual bug--a moth--inside a computer and removing it.

Ms. Hopper may have indeed been the first person to "debug" a computer, however, she did not coin the phrase "debugging". Radio repairmen for a couple of decades before WWII were "debugging" radios. The term is mentioned in at least two different articles in the "Radio News" magazine from the late 1930's. The articles referred de-bugging as having to clean out bug carcasses before any repairs or even a diagnosis could be attempted...