You can legally transfer if it isn't an OEM copy of windows. An OEM copy will have the license key on a sticker, which will be stuck to your PC. A full (or educational) copy will be legally transferable and will not have a sticker to stick on your PC. If you bought your PC from a major manufacturer, your copy of windows is most likely OEM and not legally transferable. If it is OEM, you can probably get it activated and working on your mac, but it will still be pirated software, and I'm not going to say how!
You may also have to phone Microsoft and explain what you are doing if it is a legal version of Windows. You might also have to "slipstream" updates on to a copy of the disc to make it work with a mac. Post if it is a legally transferable version and I'm sure we'll be able to help you out.