Disclosed are an Hsp90 inhibitor and a preparation method and use thereof. The Hsp90 inhibitor is 2-(4-(3-acetylcarnitineacyloxy)cyclohexylamino)-4-(1-(3,6,6-trimethyl-4-oxy-4,5,6,7-tetrahydroindazole))benzamide. The Hsp90 inhibitor has good water solubility and high bioavailability, and can effectively inhibit the proliferation of cancer cells, such as leukemia, cervical cancer, breast cancer, human laryngeal epithelial carcinoma, or malignant melanoma cells. It can also effectively inhibit the activity of herpes simplex virus. The maximal non-toxic concentration of the Hsp90 inhibitor on normal cells is a high, and the Hsp90 inhibitor only has specific inhibition effect on cancer cells.