Here's what we know:
* Animalistic Origins: The idiom likely originated from the observation of dogs. Many dogs will bark aggressively at strangers or other animals, but won't actually attack. This behavior led to the association of barking with a threat that isn't always real.
* Earliest Usage: While the exact first usage is unclear, the phrase appears in print as early as the 18th century. A 1770 book titled "The Works of the Right Honourable Joseph Addison" mentions the phrase, suggesting it was already in common use at the time.
* Evolution of Meaning: Over time, the idiom took on a broader meaning beyond dogs, applying to people who threaten or boast but don't follow through on their actions.
While the exact origin remains a bit of a mystery, the idiom's connection to dogs' barking behavior is likely the root of its meaning.