According to Microsoft you can uninstall the license key on the first computer, this frees the license up in Microsoft's servers, and then install it on the second machine. If you're not able to run the command to uninstall the license key on the first computer then you can call in, explain the situation, and they'll issue a new license key.
Of course, all of this assumes that you are using a full license and not an upgrade.
If don't want to format the old machine, then its best you just
uninstall the license just in case you decide to go back to it.
Press Windows key + X
Click Command Prompt (Admin)
At the command prompt, type: slmgr.vbs -upk
Hit Enter, this will uninstall the product key from the computer and
set it back to trial mode, you are now free to use it on another
Once you have transferred to the new machine, you might need to
reactivate by telephone:
Press Windows key + X then clickRun, then type: slui.exe 4
Next press the 'ENTER' key
Select your 'Country' from the list.
Choose the 'Phone Activation' option.
Stay on the phone (do not select/press any options) and wait for a person to help you with activation.
Explain your problem clearly to the support person.