Disclosed in the present invention is a triketone compound which has a structure shown in formula (I). Also disclosed in the present invention is a method for preparing the triketone compound having a structure as shown by formula (I) which comprises that under the rearrangement reaction conditions the compound having a structure as shown by formula (II) is contacted with a catalyst in the presence of a base and a solvent. Further disclosed in the present invention is the use of a triketone compound having a structure as shown by formula (I) in preventing and controlling weeds. Said triketone compound having a structure as shown by formula (I) in the present invention has the effect of preventing and controlling weeds in particular having an excellent effect on preventing and controlling broadleaved weeds and/or gramineae weeds.