You haven't posted what operating system you are using, so I can't address this directly.
Basically what it looks may have happened is that you took a hdd with Windows installed on it from one computer and installed it in another computer. The motherboard has identifiers which the operating system recognizes when it starts. If move the hdd to another motherboard the operating system becomes confused when it see the different identifiers of the other motherboard and may not boot. Even if it does it will more than likely eventually have enough problems that you will need to reinstall the operating system.
Before Windows 7 and 8.1 there wasn't anything you could do short of reinstalling the operating system. But in Windows 7 and 8.1 you can use the sysperp command in the Command Prompt to generalize the hdd or ssd, then you can move it to another motherboard without complications.
If you run sysprep on the HHD/SSD with Windows 7 or 8.1 before using it with another motherboard you should be be able to boot from it without any complications. You want to remove all hardware identifiers from the HDD/SSD, this generalizes the drive.
Click on the Start orb, then type cmd in the Search box.
cmd will appear under Programs above the search box, right click on it and choose Run as administrator.
This will open the Elevated Command Prompt.
In the Elevated Command Prompt type in CD C:\Windows\System32\Sysprep, then
use the command: sysprep /generalize /oobe /shutdown.
Don't power the drive back on until it's in the other computer.
Note: You'll want to install the new motherboard chipset drivers for the new motherboard after moving the drive.