The invention discloses a shikonin oxime derivative containing an aza-side chain, a preparation method and medical application thereof. The structure of the derivative is shown in a formula (I), the formula (I) is shown in the description, wherein R represents a nitrogen-containing heterocyclic ring; the nitrogen-containing heterocyclic ring comprises a substituent-containing pyridine, pyrimidine,pyrazine, pyridazine, thiazole, benzazole, morpholine, piperidine, piperazine, N-methylene-N-hydroxyethyl piperazine, N-methylene-N-hydroxybutyl piperazine and a physiologically acceptable salt thereof; n is any positive integer ranging from 1 to 4. A compound disclosed by the invention is simple in preparation method, mild in reaction condition, and relatively high in yield. The prepared shikonin naphthazarin parent nucleus hydroxymethylated carbonyl oxime derivative containing the aza-side chain has the advantages of novel structure and good water solubility. Experimental studies on in-vitro metabolism and antitumor activity show that the compound plays a role through a prodrug mechanism and is relatively strong in antitumor activity.