In theory, this should be possible with modern versions of Windows if the hardware isn't drastically different.
The main issue you may encounter is drivers - you would need to remove the old ones and install new ones. Windows update should take care of this for you.
Also depending on how Windows was licenced on your old PC, the Windows activation might not be valid for your new one.
You might also encounter some odd issues here and there caused by such a move. Plus, if the previous PC's mobo died then you might find it's caused some issues with the HDD too - I personally wouldn't rely too much on this drive even if it's still working OK now.
My advice would be to put the old hard drive in your new machine in addition to whatever's in there currently, and copy across the things you need. If you use Steam, moving the library is relatively easy for example.