That is a definite maybe.
If your old copy is an OEM version, no.
If it is a retail version, maybe. Sometimes it works, sometimes it doesn't. A lot depends on how different the two motherboards and CPUs are.
Or might might 'work', but you'd be chasing driver conflicts forever.
If you have the product key, you can just install fresh on the new drive, and activate with the key. Provided it is not an OEM key.