Sadly means in a way that shows sorrow, or unfortunately. Smiled sadly, sadly, he died, sadly mistaken.
The two uses are different: as a manner adverb it describes how something was done, and as a sentence adverb it means it is a pity — sadly, the shop was shut. Sadly mistaken is a fixed phrase meaning badly wrong. Note sad, and that the -ly ending makes the adverb.
1adverbsadlyIn a way that shows sorrow.
“She smiled sadly and waved goodbye from the train window.”
2adverbunfortunatelyUnfortunately.
“Sadly, the concert was cancelled because the singer was ill.”
sadly is a manner, or a comment.
Middle English sadly is sad plus -ly. Old English saed meant sated, and the sorrow sense came later.
Middle English
sadly
English, today
sadly
From Middle English sadly; equivalent to sad + -ly.
Etymology from Wiktionary, CC BY-SA