Wait so do you have the actual Windows key (like written on a piece of paper or digital) on hand? Make sure you get it by some means of software, like Magical Jelly Bean.
From my personal experience you have to download Windows 8.1 from Microsoft directly, throw it onto a flashdrive (or burn it to a disc if people still do that) and install it on the new machine with the new motherboard. After it's installed, then you have to do the upgrade thingy to Windows 10. Only reason I say to do it this way is because I had a Windows 7 Professional key lying around and I wanted to use it for my new Windows 10 build. It didn't work because the key was only good for WIndows 7 Professional, not for Windows 10, despite being able to upgrade through the tool you use to upgrade to Windows 10.
Hopefully the above makes sense, I really rushed through writing this since I have places to be
To answer your actual question: you can still upgrade to Windows 10 from your WIndows 8.1 key.