The invention discloses a process for preparing rifaximin, which comprises the following steps: fortimicin O is reacted with excessive 2-amino-4-picolyl for 20-24 hours at 35-45 DEG C by using ethanol as a reaction solvent; after the reaction, anhydrous potassium carbonate is added, wherein the mole number of the added anhydrous potassium carbonate is 0.9-1.1 times of that of the fortimicin O; the obtained mixture is stirred and filtered, and deionized water is added to obtained filter liquor for crystallizing; obtained filter mass is filtered; and after the filter mass is dried, a finished rifaximin product is obtained. The invention has the advantages of short time of the preparation process, simple and convenient post treatment, environmental protection, low consumption, high yield and low cost.