Can you put a hard drive that is running Windows XP into a computer that was running Windows Me?

As long as they use the same data connector, yes. However, you will likely not be able to use the hard drive, as Windows XP will not usually work when transferred to another computer, and Windows Me cannot read the NTFS file system. Reinstalling Windows XP or formatting the hard drive in Windows Me will resolve these respective issues.