The present invention relates to the field of agricultural fungicides, and discloses a compound with fungicidal activity, a fungicide composition and a preparation using the compound as an active ingredient, and a use thereof. The structure of the fungicidal compound is represented by formula (I) or formula (II). The fungicidal compound and the preparation containing the fungicidal compound in the present invention can achieve a remarkable prevention and control effect against cucumber downy mildew and rice sheath blight.