The first example is incorrect.
A compound adjective is formed by two (or more) words that jointly describe a noun. Such adjectives are usually hyphenated so as to indicate that they form a single unit. The use of a hyphen also aids clarity and removes any ambiguity for the reader. A better example of this is shown in the following sentences:
- I saw a man eating bear
- I saw a man-eating bear
The first sentence suggests that I saw a man who was eating a bear. The second clarifies that the bear I saw generally eats men.
When it comes to compounds formed by an adverb ending in -ly and an adjective, these are NEVER hyphenated. This is because ambiguity is almost impossible and so, the hyphenation is redundant.
Merriam-Webster has a useful discussion on this here. Please see the section called "Hyphenating "-ly" adverbs".
Here is an additional reference on Writing Explained.