Licensing and activation
When you Upgrade from Win 7 or 8.1 to Win 10, you don't have a 'license key' in the traditional sense. The machine is activated, and that activation status is maintained because the activation server farm stores a has of the value of your old license key and info from your current motherboard.
When it checks for updates to the OS, it also checks to see if that hash matches.
If it does, carry on.
If not, then you have issues.
A new motherboard = a whole different hash. The activation servers know nothing about that hardware.
So even if you just plug that drive into the new motherboard, it deactivate itself.
Operation
With a motherboard swap, a full reinstall is highly recommended, often required.
"Aha", you think. "I'll just clean install Windows 10!"
And then you run into the activation issue. This would be like downloading the ISO, and just installing it on a awhole new PC. Doesn't work like that.
So how to fix this?
Swap the hardware, install Win 8, activate it and do all its updates.
Then Upgrade to Win 10.
Of course, with any major swap like this...be prepared for if things go south. Have backups of whatever you deem critical.