In a sad, discontented, or unfortunate manner; with bad luck or sadness.
From 'un-' (not) plus 'happy' plus '-ly' (in the manner of). The prefix 'un-' negates the positive meaning of happy.
It's interesting that 'unhappily' can mean both 'sadly' and 'unfortunately'—like 'Unhappily, it rained' means the rain was unfortunate, even if you're not personally sad about it!
Complete word intelligence in one call. Free tier — 50 lookups/day.