The invention relates to a substituted pyrrole derivative of a general formula (I), which can be used as 3- hydroxyl group-3- methylglutaryl group-coenzyme A (HMF-CoA) reductase inhibiting agent. The compound which is disclosed can be used as a cholesterol lowering drug, which can be used to treat relative illness and symptom of cholesterol. The invention provides a method for preparing the compound which is disclosed and a medicament compound which contains the compound which is disclosed, and provides a method for curing relative illness and symptom of cholesterol. The invention comprises pharmaceutical acceptable salt, pharmaceutical acceptable solvate, and prodrug, product of metabolism, polymorph, tautomer, racemate, pure enantiomer, diastereoisomer or N- oxide compound.