My motherboard(ASUS P45) stopped recognizing my main hard drive so I installed windows on my other hard drive. I believe that my main hard drive broke but I was wondering if there are any ways I could save my hard drive or at least get the files back.
Let's assume you have your computer running normally with a new install of Windows. Take the "old" HDD, and connect it to a power cable on your functioning computer. Boot it up and listen if it spins up or not.
If so shut down, then connect the data cable (SATA or PATA), boot up to the BIOS, and in the CMOS Setup, see if it is recognized as a fixed disk. If so, boot into Windows, and see if Windows recognizes it as a lettered NTFS partition, with folders and files.
If it does not spin up, or not recognized as a fixed disc in the BIOS, then you are not going to inexpensively retrieve the data on that HDD.
First, did you change the data cable or MB connection to rule those out as the issue? Try the drive in another PC.
You should be able to get to the data unless the drive is indeed physically broken. Get an external enclosure and put the drive in that. If the drive is not seen or comes up as not formatted, you have some issues with it. First, make sure you don't click to format the drive.
If the drive is not making odd sounds, clicking, humming, whirling, you may be lucky and only the the system board or connectors went, you can probably find one online for your drive model. Look for the exact model you have, not just one that's close. If you have not played around with replacing the board, you may want to bring it to a repair shop to replace it.
If you are not lucky, replacing the system board did not help, you are left to try this as a last resort: Freeze the drive overnight. If you have one of those moisture pellet baggies like you get in shoes, place the drive and one of those in a plastic bag, along with maybe a paper towel. You want to have something in there that will absorb moisture away from the drive. If you don't have anything to absorb moisture, don't use a plastic bag as that will just make things worse. Wrap the drive in a paper towel and just toss it in the freezer. Then plug it into the PC, with luck it will fire up at least for a bit so you can copy data off it. Don't wait at all to plug the drive in. Get the PC ready to take the drive before you take it out. Once the drive heats up, the components will shift and may cause the same issue you have now. This "repair" method is highly unlikely to work, but better than 0.
The other and much more expensive but probably more sure way is to bring the drive to a full drive repair shop, but you are looking at a lot of money even to analyze the issue, and could be several thousand to repair it.