To discover potential sterol 14α-demethylase (CYP51) inhibitors, thirty-four unreported 4H-pyrano[3,2-c]pyridine derivatives were designed and synthesized. The assay results indicated that most compounds displayed significant fungicidal activity against Sclerotinia sclerotiorum, Colletotrichum lagenarium, Botrytis cinerea, Penicillium digitatum, and Fusarium oxysporum at 16 μg/mL. The half maximal effective concentration (EC50) values of compounds 7a, 7b, and 7f against B. cinerea were 0.326, 0.530, and 0.610, respectively. Namely, they had better antifungal activity than epoxiconazole (EC50 = 0.670 μg/mL). Meanwhile, their half maximal inhibitory concentration (IC50) values against CYP51 were 0.377, 0.611, and 0.748 μg/mL, respectively, representing that they also possessed better inhibitory activities than epoxiconazole (IC50 = 0.802 μg/mL). The fluorescent quenching tests of proteins showed that 7a and 7b had similar quenching patterns to epoxiconazole. The molecular dynamics simulations indicated that the binding free energy of 7a and epoxiconazole to CYP51 was -35.4 and -27.6 kcal/mol, respectively.